mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
update sync color at end of sync
https://forums.ankiweb.net/t/why-is-my-sync-button-blue/2078/13
This commit is contained in:
parent
1cb3984049
commit
2e193c3e5b
1 changed files with 8 additions and 2 deletions
|
@ -866,9 +866,15 @@ title="%s" %s>%s</button>""" % (
|
||||||
else:
|
else:
|
||||||
auth = self.pm.sync_auth()
|
auth = self.pm.sync_auth()
|
||||||
if not auth:
|
if not auth:
|
||||||
sync_login(self, lambda: self._sync_collection_and_media(lambda: None))
|
sync_login(
|
||||||
|
self,
|
||||||
|
lambda: self._sync_collection_and_media(self._after_manual_sync),
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
self._sync_collection_and_media(lambda: None)
|
self._sync_collection_and_media(self._after_manual_sync)
|
||||||
|
|
||||||
|
def _after_manual_sync(self):
|
||||||
|
self.toolbar.redraw()
|
||||||
|
|
||||||
def _sync_collection_and_media(self, after_sync: Callable[[], None]):
|
def _sync_collection_and_media(self, after_sync: Callable[[], None]):
|
||||||
"Caller should ensure auth available."
|
"Caller should ensure auth available."
|
||||||
|
|
Loading…
Reference in a new issue