listing.rs: don't create unnecessary operation

async
Manos Pitsidianakis 2020-05-10 22:33:11 +03:00
parent b2857955e4
commit a6af7fc0d3
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 0 additions and 5 deletions

View File

@ -199,8 +199,6 @@ pub trait MailListingTrait: ListingTrait {
continue;
}
ListingAction::Tag(Remove(ref tag_str)) => {
let backend_lck = account.backend.write().unwrap();
let mut op = backend_lck.operation(envelope.hash());
if let Err(err) = op.set_tag(&mut envelope, tag_str.to_string(), false) {
context.replies.push_back(UIEvent::Notification(
Some("Could not set tag.".to_string()),
@ -211,9 +209,6 @@ pub trait MailListingTrait: ListingTrait {
}
}
ListingAction::Tag(Add(ref tag_str)) => {
let backend_lck = account.backend.write().unwrap();
let mut op = backend_lck.operation(envelope.hash());
if let Err(err) = op.set_tag(&mut envelope, tag_str.to_string(), true) {
context.replies.push_back(UIEvent::Notification(
Some("Could not set tag.".to_string()),