diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-06 12:48:17 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-15 13:21:14 +0300 |
commit | c3e3c98fb07c69e053d7a9a5fcfd3fcf03f457d9 (patch) | |
tree | 4a7874d19a99573ee3e7fbfddf978b44a3f0facf /ui/src/components/mail/listing.rs | |
parent | 64dc44f18f3dbf55d5363683d874d7fc1848835f (diff) |
melib: filter subscribed folders in MailBackend::new()
Diffstat (limited to 'ui/src/components/mail/listing.rs')
-rw-r--r-- | ui/src/components/mail/listing.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs index 70e9c28e..bfece643 100644 --- a/ui/src/components/mail/listing.rs +++ b/ui/src/components/mail/listing.rs @@ -562,12 +562,14 @@ impl Listing { } *depth -= 1; } + let mut keys = entries.keys().cloned().collect::<Vec<FolderHash>>(); + keys.sort_unstable_by(|a, b| folders_order[a].partial_cmp(&folders_order[b]).unwrap()); /* Start with roots */ - for f in entries.keys() { - if entries[f].parent().is_none() { + for f in keys { + if entries[&f].parent().is_none() { print( - *f, + f, &mut depth, &mut inc, &entries, |