diff options
Diffstat (limited to 'ui/src/components/mail/listing/compact.rs')
-rw-r--r-- | ui/src/components/mail/listing/compact.rs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/ui/src/components/mail/listing/compact.rs b/ui/src/components/mail/listing/compact.rs index 96a39827..7825320a 100644 --- a/ui/src/components/mail/listing/compact.rs +++ b/ui/src/components/mail/listing/compact.rs @@ -440,12 +440,15 @@ impl ListingTrait for CompactListing { if !account.collection.contains_key(&env_hash) { continue; } - let env_hash_thread_hash = account.collection.get_env(env_hash).thread(); - if !threads.thread_nodes.contains_key(&env_hash_thread_hash) { + let env_thread_node_hash = account.collection.get_env(env_hash).thread(); + if !threads + .thread_nodes + .contains_key(&env_thread_node_hash) + { continue; } let thread = - threads.find_group(threads.thread_nodes[&env_hash_thread_hash].group); + threads.find_group(threads.thread_nodes[&env_thread_node_hash].group); if self.filtered_order.contains_key(&thread) { continue; } @@ -980,8 +983,8 @@ impl CompactListing { let folder_hash = account[self.cursor_pos.1].unwrap().folder.hash(); let threads = &account.collection.threads[&folder_hash]; let thread = threads.thread_ref(thread_hash); - // FIXME: Thread root doesn't nessessarily have message set - if let Some(env_hash) = threads.thread_nodes()[&thread.root()].message() { + let thread_node_hash = threads.thread_group_iter(thread_hash).next().unwrap().1; + if let Some(env_hash) = threads.thread_nodes()[&thread_node_hash].message() { if !account.contains_key(env_hash) { /* The envelope has been renamed or removed, so wait for the appropriate event to * arrive */ @@ -1311,12 +1314,12 @@ impl Component for CompactListing { if !account.collection.contains_key(&new_hash) { return false; } - let new_env_thread_hash = account.collection.get_env(*new_hash).thread(); - if !threads.thread_nodes.contains_key(&new_env_thread_hash) { + let new_env_thread_node_hash = account.collection.get_env(*new_hash).thread(); + if !threads.thread_nodes.contains_key(&new_env_thread_node_hash) { return false; } let thread: ThreadHash = - threads.find_group(threads.thread_nodes()[&new_env_thread_hash].group); + threads.find_group(threads.thread_nodes()[&new_env_thread_node_hash].group); if self.order.contains_key(&thread) { self.row_updates.push(thread); } |