diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-24 23:57:35 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-25 10:37:18 +0300 |
commit | f4f3b87f849dcbccaf723c3a424f6f33a8a6201f (patch) | |
tree | cdae74a98c7db8c3f16019e5d3d8b5f67142c77c /melib/src/email.rs | |
parent | 8c97336307737aa121bd57d09cd0daaa477c7913 (diff) |
ui: add selections to CompactListing
Select multiple entries by pressing 'v'. Set read/unread and delete
actions are then performed on the selected entries.
Diffstat (limited to 'melib/src/email.rs')
-rw-r--r-- | melib/src/email.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/melib/src/email.rs b/melib/src/email.rs index 90de2071..06630b97 100644 --- a/melib/src/email.rs +++ b/melib/src/email.rs @@ -779,10 +779,18 @@ impl Envelope { self.flags } pub fn set_seen(&mut self, operation: Box<BackendOp>) -> Result<()> { - self.set_flag(Flag::SEEN, operation) + if !self.flags.contains(Flag::SEEN) { + self.set_flag(Flag::SEEN, operation) + } else { + Ok(()) + } } pub fn set_unseen(&mut self, operation: Box<BackendOp>) -> Result<()> { - self.set_flag(Flag::SEEN, operation) + if self.flags.contains(Flag::SEEN) { + self.set_flag(Flag::SEEN, operation) + } else { + Ok(()) + } } pub fn is_seen(&self) -> bool { self.flags.contains(Flag::SEEN) |