client: Ensure inboxes, account and label branches are expanded by default

This commit is contained in:
Michael Gratton 2021-04-05 14:21:36 +10:00 committed by Michael James Gratton
parent 68f860a723
commit 3f6a8581bc
3 changed files with 11 additions and 4 deletions

View file

@ -34,7 +34,10 @@ public class FolderList.AccountBranch : Sidebar.Branch {
public AccountBranch(Geary.Account account) {
base(new Sidebar.Header(account.information.display_name),
Sidebar.Branch.Options.NONE, normal_folder_comparator, special_folder_comparator);
STARTUP_OPEN_GROUPING | STARTUP_EXPAND_TO_FIRST_CHILD,
normal_folder_comparator,
special_folder_comparator
);
this.account = account;
// Translators: The name of the folder group containing

View file

@ -11,8 +11,11 @@ public class FolderList.InboxesBranch : Sidebar.Branch {
get; private set; default = new Gee.HashMap<Geary.Account, InboxFolderEntry>(); }
public InboxesBranch() {
base(new Sidebar.Header(_("Inboxes")),
Sidebar.Branch.Options.NONE, inbox_comparator);
base(
new Sidebar.Header(_("Inboxes")),
STARTUP_OPEN_GROUPING,
inbox_comparator
);
}
private static int inbox_comparator(Sidebar.Entry a, Sidebar.Entry b) {

View file

@ -641,8 +641,9 @@ public class Sidebar.Tree : Gtk.TreeView {
associate_entry(insertion_iter, entry);
associate_children(branch, entry, insertion_iter);
if (branch.is_auto_open_on_new_child())
if (branch.is_auto_open_on_new_child() || parent is Grouping) {
expand_to_entry(entry);
}
}
private void on_branch_entry_removed(Sidebar.Branch branch, Sidebar.Entry entry) {