Folders: Adjust ui when account is disconnected #5477
authorChristian Kamm <mail@ckamm.de>
Tue, 24 Jan 2017 09:26:03 +0000 (10:26 +0100)
committerChristian Kamm <mail@ckamm.de>
Tue, 24 Jan 2017 09:26:03 +0000 (10:26 +0100)
Previously if you paused/unpaused a folder for a disconnected account
they would prepare to sync and thus display the 'Waiting...' text. With
this change, folders that can't possibly sync don't show text like
this.

When account connectivity changes, all unpaused folders will be
scheduled anyway.

src/gui/folderstatusmodel.cpp

index 42b787d146c8ece7b34e3763c50c19f99696c1c4..2aaa4658f948f554cd0e45e3eb18a8a4339f8d25 100644 (file)
@@ -981,7 +981,7 @@ void FolderStatusModel::slotFolderSyncStateChange(Folder *f)
     auto& pi = _folders[folderIndex]._progress;
 
     SyncResult::Status state = f->syncResult().status();
-    if (f->syncPaused()) {
+    if (!f->canSync()) {
         // Reset progress info.
         pi = SubFolderInfo::Progress();
     } else if (state == SyncResult::NotYetStarted) {