summaryrefslogtreecommitdiffstats
path: root/ui/src/components/mail/listing.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-12-01 22:28:50 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-12-07 20:47:59 +0200
commitf632bc4c08b7a9d4630b34c446863f2126716316 (patch)
treeaf2b5b1ef46c55b5b25aee039d172cc12a439383 /ui/src/components/mail/listing.rs
parentc6f1fa9be03616a66d3fadc1fdd439125c0b4702 (diff)
ui: update rows on TagAdd/TagRemove
Except for threadlisting
Diffstat (limited to 'ui/src/components/mail/listing.rs')
-rw-r--r--ui/src/components/mail/listing.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs
index cd1d5f64..ad53231a 100644
--- a/ui/src/components/mail/listing.rs
+++ b/ui/src/components/mail/listing.rs
@@ -92,7 +92,6 @@ pub trait MailListingTrait: ListingTrait {
StatusEvent::DisplayMessage(e.to_string()),
));
}
- self.row_updates().push(thread_hash);
}
ListingAction::SetUnseen => {
if let Err(e) = envelope.set_unseen(op) {
@@ -153,8 +152,7 @@ pub trait MailListingTrait: ListingTrait {
}
fn row_updates(&mut self) -> &mut StackVec<ThreadHash>;
-
- fn update_line(&mut self, context: &Context, thread_hash: ThreadHash);
+ fn get_focused_items(&self, _context: &Context) -> StackVec<ThreadHash>;
}
pub trait ListingTrait: Component {
@@ -508,6 +506,17 @@ impl Component for Listing {
self.component.set_style(IndexStyle::Conversations);
return true;
}
+ Action::Listing(a @ ListingAction::SetSeen)
+ | Action::Listing(a @ ListingAction::SetUnseen)
+ | Action::Listing(a @ ListingAction::Delete)
+ | Action::Listing(a @ ListingAction::Tag(_)) => {
+ let focused = self.component.get_focused_items(context);
+ for i in focused {
+ self.component.perform_action(context, i, a);
+ }
+ self.component.set_dirty();
+ return true;
+ }
_ => {}
},
UIEvent::RefreshMailbox((idxa, folder_hash)) => {