summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/imapresource/imapresource.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp
index 5aa18dd..e7458f6 100644
--- a/examples/imapresource/imapresource.cpp
+++ b/examples/imapresource/imapresource.cpp
@@ -492,7 +492,7 @@ public:
492 //Otherwise fetch full payload for daterange 492 //Otherwise fetch full payload for daterange
493 auto folderList = QSharedPointer<QVector<Folder>>::create(); 493 auto folderList = QSharedPointer<QVector<Folder>>::create();
494 return imap->fetchFolders([folderList](const Folder &folder) { 494 return imap->fetchFolders([folderList](const Folder &folder) {
495 if (!folder.noselect) { 495 if (!folder.noselect && folder.subscribed) {
496 *folderList << folder; 496 *folderList << folder;
497 } 497 }
498 }) 498 })
@@ -580,14 +580,7 @@ public:
580 bool syncHeaders = query.hasFilter<ApplicationDomain::Mail::Folder>(); 580 bool syncHeaders = query.hasFilter<ApplicationDomain::Mail::Folder>();
581 //FIXME If we were able to to flush in between we could just query the local store for the folder list. 581 //FIXME If we were able to to flush in between we could just query the local store for the folder list.
582 return getFolderList(imap, query) 582 return getFolderList(imap, query)
583 .then([=] (const QVector<Folder> &folders) {
584 //Synchronize folders
585 return KAsync::value(folders)
586 .serialEach<void>([=](const Folder &folder) { 583 .serialEach<void>([=](const Folder &folder) {
587 //Skip unsubscribed folders
588 if (!folder.subscribed) {
589 return KAsync::null<void>();
590 }
591 SinkLog() << "Syncing folder " << folder.path(); 584 SinkLog() << "Syncing folder " << folder.path();
592 //Emit notification that the folder is being synced. 585 //Emit notification that the folder is being synced.
593 //The synchronizer can't do that because it has no concept of the folder filter on a mail sync scope meaning that the folder is being synchronized. 586 //The synchronizer can't do that because it has no concept of the folder filter on a mail sync scope meaning that the folder is being synchronized.
@@ -602,7 +595,6 @@ public:
602 SinkWarning() << "Failed to sync folder: " << folder.path() << "Error: " << error.errorMessage; 595 SinkWarning() << "Failed to sync folder: " << folder.path() << "Error: " << error.errorMessage;
603 }); 596 });
604 }); 597 });
605 });
606 } 598 }
607 }) 599 })
608 .then([=] (const KAsync::Error &error) { 600 .then([=] (const KAsync::Error &error) {