summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-07-11 12:29:17 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-07-11 12:29:17 +0300
commit46a05747133a40ac5be73bbb6ac18080e84466ab (patch)
treeb4217fb8fd32930173650b093aac3aafb4e41f5a
parent93f3d6e230f15b428f5be3a49b813cad093c0aa2 (diff)
ui: permanently mark selected rows in self.data_columns
`self.draw_list` detects `bg_color` by checking the first cell of the first column, so set it to make it permanent
-rw-r--r--ui/src/components/mail/listing/compact.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/src/components/mail/listing/compact.rs b/ui/src/components/mail/listing/compact.rs
index 69fbdf11..15896841 100644
--- a/ui/src/components/mail/listing/compact.rs
+++ b/ui/src/components/mail/listing/compact.rs
@@ -1080,6 +1080,14 @@ impl Component for CompactListing {
UIEvent::Input(ref key) if !self.unfocused && *key == shortcuts["select_entry"] => {
let env_hash = self.get_envelope_under_cursor(self.cursor_pos.2, context);
self.selection.entry(env_hash).and_modify(|e| *e = !*e);
+ if self.selection[&env_hash] {
+ /* self.draw_list detects bg_color by checking the first cell of the first column, so
+ * set it to make it permanent */
+ let bg_color = Color::Byte(210);
+ for x in 0..self.data_columns.columns[0].size().0 {
+ self.data_columns.columns[0][(x, self.order[&env_hash])].set_bg(bg_color);
+ }
+ }
}
UIEvent::MailboxUpdate((ref idxa, ref idxf))
if (*idxa, *idxf)