notmuch: don't remove tags from tag_index

When removing a tag, we shouldn't also remove it from the tag index.
memfd
Manos Pitsidianakis 2020-05-10 23:56:35 +03:00
parent a6af7fc0d3
commit c5fe511d95
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
4 changed files with 3 additions and 2 deletions

View File

@ -792,8 +792,6 @@ impl BackendOp for NotmuchOp {
let hash = tag_hash!(tag);
if value {
self.tag_index.write().unwrap().insert(hash, tag);
} else {
self.tag_index.write().unwrap().remove(&hash);
}
if !envelope.labels().iter().any(|&h_| h_ == hash) {
if value {

View File

@ -698,6 +698,7 @@ impl CompactListing {
.ignore_tags
)
.contains(t)
|| !tags_lck.contains_key(t)
{
continue;
}

View File

@ -606,6 +606,7 @@ impl ConversationsListing {
.ignore_tags
)
.contains(t)
|| !tags_lck.contains_key(t)
{
continue;
}

View File

@ -662,6 +662,7 @@ impl PlainListing {
.ignore_tags
)
.contains(t)
|| !tags_lck.contains_key(t)
{
continue;
}