[geary/cherry-pick-adf21161] Merge branch 'faster-folder-switching' into 'master'



commit 4be93c147b4cb01015d5f5853b8524c4d1eeff90
Author: Michael Gratton <mike vee net>
Date:   Wed Sep 12 10:55:19 2018 +0000

    Merge branch 'faster-folder-switching' into 'master'
    
    Faster folder switching
    
    See merge request GNOME/geary!42
    
    (cherry picked from commit adf21161e96ae086234d02f23684e697ac1ec915)
    
    83872710 Remove pointless null-check
    3ea103eb Only rebuild copy/move toolbars when switching accounts

 src/client/application/geary-controller.vala | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index d73afa3f..cca7fcb8 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1422,6 +1422,13 @@ public class GearyController : Geary.BaseObject {
                 
                 pending_mailtos.clear();
             }
+
+            main_window.main_toolbar.copy_folder_menu.clear();
+            main_window.main_toolbar.move_folder_menu.clear();
+            foreach(Geary.Folder f in current_folder.account.list_folders()) {
+                main_window.main_toolbar.copy_folder_menu.add_folder(f);
+                main_window.main_toolbar.move_folder_menu.add_folder(f);
+            }
         }
         
         folder_selected(current_folder);
@@ -1429,18 +1436,9 @@ public class GearyController : Geary.BaseObject {
         if (!(current_folder is Geary.SearchFolder))
             previous_non_search_folder = current_folder;
         
-        main_window.main_toolbar.copy_folder_menu.clear();
-        main_window.main_toolbar.move_folder_menu.clear();
-        foreach(Geary.Folder f in current_folder.account.list_folders()) {
-            main_window.main_toolbar.copy_folder_menu.add_folder(f);
-            main_window.main_toolbar.move_folder_menu.add_folder(f);
-        }
-        
         // disable copy/move to the new folder
-        if (current_folder != null) {
-            main_window.main_toolbar.copy_folder_menu.enable_disable_folder(current_folder, false);
-            main_window.main_toolbar.move_folder_menu.enable_disable_folder(current_folder, false);
-        }
+        main_window.main_toolbar.copy_folder_menu.enable_disable_folder(current_folder, false);
+        main_window.main_toolbar.move_folder_menu.enable_disable_folder(current_folder, false);
         
         update_ui();
         


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