Skip to content

Commit c39d1c4

Browse files
authored
Refactor synchronization mode handling logic
1 parent 0678e49 commit c39d1c4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/core/synchronization.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
class Syncing:
1313
def __init__(self, now):
1414
self.last_sync_date = self.load_last_sync_date()
15-
if now:
16-
print("MODE: Sync now")
17-
self.download_config()
15+
if not settings["file-for-syncing"]:
16+
print("Synchronization is not set up. Maybe you have not selected the cloud drive folder in the \"Connect to the cloud storage\" dialog?")
1817
else:
19-
if not settings["file-for-syncing"]:
20-
print("Synchronization is not set up. Maybe you have not selected the cloud drive folder in the \"Connect to the cloud storage\" dialog?")
18+
if now:
19+
print("MODE: Sync now")
20+
self.download_config()
2121
else:
22-
print("MODE: Synchronization")
22+
print("MODE: Periodic synchronization")
2323
self.get_sync_interval()
2424

2525
# Load the last date from the {DATA}/sync-info.json file

0 commit comments

Comments
 (0)