Fix: Clear content of ASSIGNMENT_ENTRY_LIST if needed

This commit is contained in:
Zebartin 2024-05-21 18:48:12 +08:00
parent bff1da7899
commit d34120358a
2 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from tasks.assignment.claim import AssignmentClaim
from tasks.assignment.keywords import (KEYWORDS_ASSIGNMENT_GROUP,
AssignmentEntry, AssignmentEventEntry,
AssignmentEventGroup)
from tasks.assignment.ui import AssignmentStatus
from tasks.assignment.ui import ASSIGNMENT_ENTRY_LIST, AssignmentStatus
from tasks.base.page import page_assignment, page_menu
from tasks.daily.keywords import KEYWORDS_DAILY_QUEST
from tasks.daily.synthesize import SynthesizeUI
@ -33,6 +33,7 @@ class Assignment(AssignmentClaim, SynthesizeUI):
self.dispatched = dict()
self.has_new_dispatch = False
ASSIGNMENT_ENTRY_LIST.cur_buttons = []
self.ensure_scroll_top(page_menu)
self.ui_ensure(page_assignment)
event_ongoing = next((

View File

@ -244,8 +244,9 @@ class AssignmentUI(UI):
if timeout.reached():
logger.warning('Wait correct entry loaded timeout')
break
if self.appear(EVENT_FINISHED):
logger.info('Event finished')
if isinstance(group, AssignmentEventGroup) and self.appear(EVENT_FINISHED):
logger.info('Correct entry loaded')
ASSIGNMENT_ENTRY_LIST.cur_buttons = []
break
ASSIGNMENT_ENTRY_LIST.load_rows(self)