Don't select wrong Inbox

Fixes the inboxes branch inbox being selected when the account branch
inbox was clicked.
This commit is contained in:
Michael Gratton 2019-12-04 09:44:38 +08:00
parent b6e790e3db
commit 2590e0090e

View file

@ -669,9 +669,11 @@ public class Application.MainWindow :
// selection changed callback. That will check to
// ensure that we're not setting it again.
if (to_select != null) {
// Prefer the inboxes branch if it exists
if (to_select.special_folder_type != INBOX ||
!this.folder_list.select_inbox(to_select.account)) {
// Prefer the inboxes branch if it is a thing, but
// only for non-interactive calls
if (is_interactive ||
(to_select.special_folder_type != INBOX ||
!this.folder_list.select_inbox(to_select.account))) {
this.folder_list.select_folder(to_select);
}
} else {