melib: keep old_hash in Collection temporarily

When renaming envelopes, keep old_hash in collection until we receive an
EnvelopeRename event in ui
embed
Manos Pitsidianakis 2019-05-07 01:59:38 +03:00
parent f1734048c8
commit 9afeb648f7
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ impl<'a> BackendOp for MaildirOp {
let hash_index = self.hash_index.clone();
let mut map = hash_index.lock().unwrap();
let map = map.entry(self.folder_hash).or_default();
map.remove(&old_hash);
map.insert(old_hash, new_name.clone());
map.insert(new_hash, new_name);
Ok(())
}