mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
on a sync conflict with a local empty deck, force download
This commit is contained in:
parent
427670b565
commit
61c577df85
1 changed files with 11 additions and 7 deletions
18
aqt/sync.py
18
aqt/sync.py
|
@ -289,13 +289,17 @@ class SyncThread(QThread):
|
||||||
self._syncMedia()
|
self._syncMedia()
|
||||||
|
|
||||||
def _fullSync(self):
|
def _fullSync(self):
|
||||||
# tell the calling thread we need a decision on sync direction, and
|
# if the local deck is empty, assume user is trying to download
|
||||||
# wait for a reply
|
if self.col.isEmpty():
|
||||||
self.fullSyncChoice = False
|
f = "download"
|
||||||
self.fireEvent("fullSync")
|
else:
|
||||||
while not self.fullSyncChoice:
|
# tell the calling thread we need a decision on sync direction, and
|
||||||
time.sleep(0.1)
|
# wait for a reply
|
||||||
f = self.fullSyncChoice
|
self.fullSyncChoice = False
|
||||||
|
self.fireEvent("fullSync")
|
||||||
|
while not self.fullSyncChoice:
|
||||||
|
time.sleep(0.1)
|
||||||
|
f = self.fullSyncChoice
|
||||||
if f == "cancel":
|
if f == "cancel":
|
||||||
return
|
return
|
||||||
self.client = FullSyncer(self.col, self.hkey, self.server.con)
|
self.client = FullSyncer(self.col, self.hkey, self.server.con)
|
||||||
|
|
Loading…
Reference in a new issue