修复签到bug
This commit is contained in:
@@ -463,16 +463,10 @@ class MessageSignPlugin(MessagePluginInterface):
|
|||||||
# 计算新的连签天数
|
# 计算新的连签天数
|
||||||
new_streak = original_streak
|
new_streak = original_streak
|
||||||
|
|
||||||
# 如果有断签前记录,直接使用断签前连签天数+1
|
# 恢复连签:断签前连签天数 + 1 (补签后相当于连续签到)
|
||||||
if previous_streak > 0:
|
new_streak = previous_streak + 1
|
||||||
# 恢复连签:断签前连签天数 + 1 (补签后相当于连续签到)
|
self.LOG.info(f"恢复连签: {previous_streak} + 1 = {new_streak}")
|
||||||
new_streak = previous_streak + 1
|
|
||||||
self.LOG.info(f"恢复连签: {previous_streak} + 1 = {new_streak}")
|
|
||||||
else:
|
|
||||||
# 如果没有断签前记录,则连签天数+1
|
|
||||||
new_streak = original_streak + 1
|
|
||||||
self.LOG.info(f"普通补签: {original_streak} + 1 = {new_streak}")
|
|
||||||
|
|
||||||
# 更新签到记录
|
# 更新签到记录
|
||||||
yesterday_time = yesterday.replace(hour=current_time.hour, minute=current_time.minute,
|
yesterday_time = yesterday.replace(hour=current_time.hour, minute=current_time.minute,
|
||||||
second=current_time.second)
|
second=current_time.second)
|
||||||
|
|||||||
Reference in New Issue
Block a user