diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-04 07:53:36 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-04 07:53:36 +0200 |
commit | a2ecf2a77a38025442da8150156e5b59f107b897 (patch) | |
tree | 3e7481bb98bc3584d8d040bc812a1b9e91c986d9 /examples/imapresource | |
parent | 9487403a87a93a738955bb9cafd0d12efa295896 (diff) | |
download | sink-a2ecf2a77a38025442da8150156e5b59f107b897.tar.gz sink-a2ecf2a77a38025442da8150156e5b59f107b897.zip |
Only sync subscribed folders
Diffstat (limited to 'examples/imapresource')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 8577b8c..8e6d2b1 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -584,6 +584,10 @@ public: | |||
584 | //Synchronize folders | 584 | //Synchronize folders |
585 | return KAsync::value(folders) | 585 | return KAsync::value(folders) |
586 | .serialEach<void>([=](const Folder &folder) { | 586 | .serialEach<void>([=](const Folder &folder) { |
587 | //Skip unsubscribed folders | ||
588 | if (!folder.subscribed) { | ||
589 | return KAsync::null<void>(); | ||
590 | } | ||
587 | SinkLog() << "Syncing folder " << folder.path(); | 591 | SinkLog() << "Syncing folder " << folder.path(); |
588 | //Emit notification that the folder is being synced. | 592 | //Emit notification that the folder is being synced. |
589 | //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. | 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. |