summaryrefslogtreecommitdiffstats
path: root/ui/src/components/mail/listing/mod.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2018-08-19 14:08:20 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-06-10 19:40:30 +0300
commit84bf2d43beb6992c936b4832bc8b07dd3c533f00 (patch)
treedf72b8ab86b8d460fb9dfe08824f6cdb0ad2db17 /ui/src/components/mail/listing/mod.rs
parent681ac4b84945c03a77c58f487615acaa7f6c751e (diff)
Move accounts to `ui`
Diffstat (limited to 'ui/src/components/mail/listing/mod.rs')
-rw-r--r--ui/src/components/mail/listing/mod.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/ui/src/components/mail/listing/mod.rs b/ui/src/components/mail/listing/mod.rs
index 5ad511e0..5dc6dba5 100644
--- a/ui/src/components/mail/listing/mod.rs
+++ b/ui/src/components/mail/listing/mod.rs
@@ -96,7 +96,8 @@ impl MailListing {
let threaded = context.accounts[self.cursor_pos.0]
.runtime_settings
- .threaded;
+ .conf()
+ .threaded();
// Inform State that we changed the current folder view.
context.replies.push_back(UIEvent {
id: 0,
@@ -293,7 +294,8 @@ impl MailListing {
fn highlight_line_self(&mut self, idx: usize, context: &Context) {
let threaded = context.accounts[self.cursor_pos.0]
.runtime_settings
- .threaded;
+ .conf()
+ .threaded();
let mailbox = &context.accounts[self.cursor_pos.0][self.cursor_pos.1]
.as_ref()
.unwrap();
@@ -327,7 +329,8 @@ impl MailListing {
fn highlight_line(&self, grid: &mut CellBuffer, area: Area, idx: usize, context: &Context) {
let threaded = context.accounts[self.cursor_pos.0]
.runtime_settings
- .threaded;
+ .conf()
+ .threaded();
let mailbox = &context.accounts[self.cursor_pos.0][self.cursor_pos.1]
.as_ref()
.unwrap();
@@ -515,7 +518,8 @@ impl Component for MailListing {
} else {
let threaded = context.accounts[self.cursor_pos.0]
.runtime_settings
- .threaded;
+ .conf()
+ .threaded();
let account = &mut context.accounts[self.cursor_pos.0];
let (hash, is_seen) = {
let mailbox = &mut account[self.cursor_pos.1]
@@ -737,9 +741,8 @@ impl Component for MailListing {
Action::MailListing(MailListingAction::ToggleThreaded) => {
context.accounts[self.cursor_pos.0]
.runtime_settings
- .threaded = !context.accounts[self.cursor_pos.0]
- .runtime_settings
- .threaded;
+ .conf_mut()
+ .toggle_threaded();
self.refresh_mailbox(context);
self.dirty = true;
return;