Fix sync status check blocking collection access

This commit is contained in:
Damien Elmes 2023-12-10 12:29:58 +10:00
parent 548aca5b4f
commit a7d7301d33

View file

@ -56,7 +56,12 @@ def get_sync_status(
mw.pm.set_current_sync_url(out.new_endpoint)
callback(out)
mw.taskman.run_in_background(lambda: mw.col.sync_status(auth), on_future_done)
mw.taskman.run_in_background(
lambda: mw.col.sync_status(auth),
on_future_done,
# The check quickly releases the collection, and we don't need to block other callers
uses_collection=False,
)
def handle_sync_error(mw: aqt.main.AnkiQt, err: Exception) -> None: