fix sync deauth
This commit is contained in:
parent
319390f0c6
commit
f6ddcd81df
@ -79,6 +79,9 @@ class MediaManager:
|
||||
def dir(self) -> Any:
|
||||
return self._dir
|
||||
|
||||
def force_resync(self) -> None:
|
||||
os.unlink(media_paths_from_col_path(self.col.path)[1])
|
||||
|
||||
# File manipulation
|
||||
##########################################################################
|
||||
|
||||
|
@ -10,7 +10,7 @@ import aqt
|
||||
from anki.lang import _
|
||||
from aqt import AnkiQt
|
||||
from aqt.qt import *
|
||||
from aqt.utils import askUser, openHelp, showInfo
|
||||
from aqt.utils import askUser, openHelp, showInfo, showWarning
|
||||
|
||||
|
||||
class Preferences(QDialog):
|
||||
@ -196,9 +196,12 @@ Not currently enabled; click the sync button in the main window to enable."""
|
||||
)
|
||||
)
|
||||
|
||||
def onSyncDeauth(self):
|
||||
def onSyncDeauth(self) -> None:
|
||||
if self.mw.media_syncer.is_syncing():
|
||||
showWarning("Can't log out while sync in progress.")
|
||||
return
|
||||
self.prof["syncKey"] = None
|
||||
self.mw.col.media.forceResync()
|
||||
self.mw.col.media.force_resync()
|
||||
self._hideAuth()
|
||||
|
||||
def updateNetwork(self):
|
||||
|
Loading…
Reference in New Issue
Block a user