* Do not change to folders view if we still have 1 or more accounts
[modest] / src / hildon2 / modest-hildon2-window-mgr.c
index 0471450..3dd7504 100644 (file)
@@ -726,7 +726,9 @@ on_account_removed (TnyAccountStore *acc_store,
        stack = hildon_window_stack_get_default ();
        current_top = (ModestWindow *) hildon_window_stack_peek (stack);
 
        stack = hildon_window_stack_get_default ();
        current_top = (ModestWindow *) hildon_window_stack_peek (stack);
 
-       if (current_top && MODEST_IS_ACCOUNTS_WINDOW (current_top))
+       if (current_top &&
+           MODEST_IS_ACCOUNTS_WINDOW (current_top) &&
+           !modest_account_mgr_has_accounts (modest_runtime_get_account_mgr (), TRUE))
                create_folders_view (MODEST_WINDOW_MGR (user_data));
 }
 
                create_folders_view (MODEST_WINDOW_MGR (user_data));
 }