Skip to content

Commit

Permalink
fix(core): 补充公告逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
DLmaster361 committed Jan 28, 2025
1 parent e78f397 commit b4228e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/ui/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@ def show_notice(self, if_show: bool = True):
else:
time_local = datetime.strptime("2000-01-01 00:00", "%Y-%m-%d %H:%M")

if if_show or datetime.strptime(notice["time"], "%Y-%m-%d %H:%M") > time_local:
if if_show or (
datetime.now() > datetime.strptime(notice["time"], "%Y-%m-%d %H:%M")
and datetime.strptime(notice["time"], "%Y-%m-%d %H:%M") > time_local
):

choice = Dialog("公告", notice["content"], self)
choice.cancelButton.hide()
Expand Down

0 comments on commit b4228e3

Please sign in to comment.