mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
add hook for day rollover (#3817)
* add hook for day rollover * rollover -> day_did_change
This commit is contained in:
parent
59e143ec25
commit
5552fc6e97
2 changed files with 3 additions and 0 deletions
|
@ -554,6 +554,8 @@ class AnkiQt(QMainWindow):
|
||||||
last_day_cutoff = self.col.sched.day_cutoff
|
last_day_cutoff = self.col.sched.day_cutoff
|
||||||
self.reviewer._refresh_needed = RefreshNeeded.QUEUES
|
self.reviewer._refresh_needed = RefreshNeeded.QUEUES
|
||||||
self.reviewer.refresh_if_needed()
|
self.reviewer.refresh_if_needed()
|
||||||
|
if last_day_cutoff != current_cutoff:
|
||||||
|
gui_hooks.day_did_change()
|
||||||
|
|
||||||
# schedule another check
|
# schedule another check
|
||||||
secs_until_cutoff = current_cutoff - int_time()
|
secs_until_cutoff = current_cutoff - int_time()
|
||||||
|
|
|
@ -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.""",
|
`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
|
# Importing/exporting data
|
||||||
###################
|
###################
|
||||||
Hook(
|
Hook(
|
||||||
|
|
Loading…
Reference in a new issue