add hook for day rollover (#3817)

* add hook for day rollover

* rollover -> day_did_change
This commit is contained in:
Jake Probst 2025-02-17 22:46:15 -08:00 committed by GitHub
parent 59e143ec25
commit 5552fc6e97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -554,6 +554,8 @@ class AnkiQt(QMainWindow):
last_day_cutoff = self.col.sched.day_cutoff
self.reviewer._refresh_needed = RefreshNeeded.QUEUES
self.reviewer.refresh_if_needed()
if last_day_cutoff != current_cutoff:
gui_hooks.day_did_change()
# schedule another check
secs_until_cutoff = current_cutoff - int_time()

View file

@ -898,6 +898,7 @@ gui_hooks.webview_did_inject_style_into_page.append(mytest)
`output` provides access to the unused/missing file lists and the text output that will be shown in the Check Media screen.""",
),
Hook(name="day_did_change", doc="""Called when Anki moves to the next day."""),
# Importing/exporting data
###################
Hook(