Add some documentation to sync_did_finish hook

This commit is contained in:
Henrik Giesel 2020-09-14 13:18:16 +02:00
parent 6e5a826993
commit 0c7caa1644
2 changed files with 11 additions and 1 deletions

View file

@ -2722,6 +2722,10 @@ style_did_init = _StyleDidInitFilter()
class _SyncDidFinishHook: class _SyncDidFinishHook:
"""Executes after the sync of the collection concluded.
Note that the media sync did not necessarily finish at this point."""
_hooks: List[Callable[[], None]] = [] _hooks: List[Callable[[], None]] = []
def append(self, cb: Callable[[], None]) -> None: def append(self, cb: Callable[[], None]) -> None:

View file

@ -563,7 +563,13 @@ gui_hooks.webview_did_inject_style_into_page.append(mytest)
doc="""Allows changing the list of cards to delete.""", doc="""Allows changing the list of cards to delete.""",
), ),
Hook(name="sync_will_start", args=[]), Hook(name="sync_will_start", args=[]),
Hook(name="sync_did_finish", args=[]), Hook(
name="sync_did_finish",
args=[],
doc="""Executes after the sync of the collection concluded.
Note that the media sync did not necessarily finish at this point.""",
),
# Adding cards # Adding cards
################### ###################
Hook( Hook(