[geary/wip/795595-fix-special-folder-creation: 4/6] Ensure folders are removed from local account's cache when deleted



commit 4989cc78ef9c9f9d5f2d46a0f2b8f8076e0ce31f
Author: Michael Gratton <mike vee net>
Date:   Wed Sep 26 23:21:52 2018 +1000

    Ensure folders are removed from local account's cache when deleted

 src/engine/imap-db/imap-db-account.vala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index 02063e40..85941990 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -450,11 +450,13 @@ private class Geary.ImapDB.Account : BaseObject {
                 debug("Can't delete folder %s because it has children", folder.to_string());
                 return Db.TransactionOutcome.ROLLBACK;
             }
-            
+
             do_delete_folder(cx, folder_id, cancellable);
-            
+            this.folder_refs.unset(path);
+
             return Db.TransactionOutcome.COMMIT;
         }, cancellable);
+
     }
 
     private void initialize_contacts(Cancellable? cancellable = null) throws Error {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]