fix(core): 补充公告逻辑

This commit is contained in:
DLmaster
2025-01-28 19:28:04 +08:00
parent e78f3973be
commit b4228e3f35

View File

@@ -371,7 +371,10 @@ class Setting(QWidget):
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()