summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-09-20 09:15:13 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-09-20 09:15:13 +0300
commit146acb70dd2d2670f3a35394ce962ee330bdbbb7 (patch)
treefa11a1a1366772f60e56c3b18bd334fd36309689
parent828718141a11ff2ba5c9a507b82d27624193da19 (diff)
ui: check account conf for index style in listing.rs
-rw-r--r--ui/src/components/mail/listing.rs29
1 files changed, 19 insertions, 10 deletions
diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs
index 9518a4e2..ec021d24 100644
--- a/ui/src/components/mail/listing.rs
+++ b/ui/src/components/mail/listing.rs
@@ -290,11 +290,13 @@ impl Component for Listing {
.and_then(|account| account.folder_confs(folder_hash).conf_override.index_style)
{
self.component.set_style(index_style);
- };
- // Inform State that we changed the current folder view.
- context
- .replies
- .push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
+ } else if let Some(index_style) = context
+ .accounts
+ .get(self.cursor_pos.0)
+ .and_then(|account| Some(account.settings.conf.index_style()))
+ {
+ self.component.set_style(index_style);
+ }
context
.replies
.push_back(UIEvent::StatusEvent(StatusEvent::UpdateStatus(
@@ -335,11 +337,13 @@ impl Component for Listing {
.and_then(|account| account.folder_confs(folder_hash).conf_override.index_style)
{
self.component.set_style(index_style);
- };
- // Inform State that we changed the current folder view.
- context
- .replies
- .push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
+ } else if let Some(index_style) = context
+ .accounts
+ .get(self.cursor_pos.0)
+ .and_then(|account| Some(account.settings.conf.index_style()))
+ {
+ self.component.set_style(index_style);
+ }
context
.replies
.push_back(UIEvent::StatusEvent(StatusEvent::UpdateStatus(
@@ -577,6 +581,11 @@ impl Listing {
})
}) {
ListingComponent::from(index_style)
+ } else if let Some(index_style) = accounts
+ .get(0)
+ .and_then(|account| Some(account.settings.conf.index_style()))
+ {
+ ListingComponent::from(index_style)
} else {
Conversations(Default::default())
};