summaryrefslogtreecommitdiffstats
path: root/ui/src/components/mail/view/thread.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2020-01-18 05:02:03 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2020-01-20 16:03:29 +0200
commite07b5faf6edabf5e6455805b70884aef75ba7157 (patch)
treea0d60ca961699013d41d3e65103fbb4b224db21d /ui/src/components/mail/view/thread.rs
parent350fafb51597e0e07fab731e111ae92b409b7834 (diff)
melib/threads: already-exists check in threads insert
Diffstat (limited to 'ui/src/components/mail/view/thread.rs')
-rw-r--r--ui/src/components/mail/view/thread.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/src/components/mail/view/thread.rs b/ui/src/components/mail/view/thread.rs
index 1635a5f8..3275d98a 100644
--- a/ui/src/components/mail/view/thread.rs
+++ b/ui/src/components/mail/view/thread.rs
@@ -168,16 +168,17 @@ impl ThreadView {
let thread_iter = threads.thread_group_iter(self.thread_group);
self.entries.clear();
- for (line, (ind, thread_hash)) in thread_iter.enumerate() {
- let entry = if let Some(msg_hash) = threads.thread_nodes()[&thread_hash].message() {
+ for (line, (ind, thread_node_hash)) in thread_iter.enumerate() {
+ let entry = if let Some(msg_hash) = threads.thread_nodes()[&thread_node_hash].message()
+ {
let seen: bool = account.collection.get_env(msg_hash).is_seen();
- self.make_entry((ind, thread_hash, line), msg_hash, seen)
+ self.make_entry((ind, thread_node_hash, line), msg_hash, seen)
} else {
continue;
};
self.entries.push(entry);
match expanded_hash {
- Some(expanded_hash) if expanded_hash == thread_hash => {
+ Some(expanded_hash) if expanded_hash == thread_node_hash => {
self.new_expanded_pos = self.entries.len().saturating_sub(1);
self.expanded_pos = self.new_expanded_pos + 1;
}