ui: check account conf for index style in listing.rs
parent
828718141a
commit
146acb70dd
|
@ -290,11 +290,13 @@ impl Component for Listing {
|
||||||
.and_then(|account| account.folder_confs(folder_hash).conf_override.index_style)
|
.and_then(|account| account.folder_confs(folder_hash).conf_override.index_style)
|
||||||
{
|
{
|
||||||
self.component.set_style(index_style);
|
self.component.set_style(index_style);
|
||||||
};
|
} else if let Some(index_style) = context
|
||||||
// Inform State that we changed the current folder view.
|
.accounts
|
||||||
context
|
.get(self.cursor_pos.0)
|
||||||
.replies
|
.and_then(|account| Some(account.settings.conf.index_style()))
|
||||||
.push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
|
{
|
||||||
|
self.component.set_style(index_style);
|
||||||
|
}
|
||||||
context
|
context
|
||||||
.replies
|
.replies
|
||||||
.push_back(UIEvent::StatusEvent(StatusEvent::UpdateStatus(
|
.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)
|
.and_then(|account| account.folder_confs(folder_hash).conf_override.index_style)
|
||||||
{
|
{
|
||||||
self.component.set_style(index_style);
|
self.component.set_style(index_style);
|
||||||
};
|
} else if let Some(index_style) = context
|
||||||
// Inform State that we changed the current folder view.
|
.accounts
|
||||||
context
|
.get(self.cursor_pos.0)
|
||||||
.replies
|
.and_then(|account| Some(account.settings.conf.index_style()))
|
||||||
.push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
|
{
|
||||||
|
self.component.set_style(index_style);
|
||||||
|
}
|
||||||
context
|
context
|
||||||
.replies
|
.replies
|
||||||
.push_back(UIEvent::StatusEvent(StatusEvent::UpdateStatus(
|
.push_back(UIEvent::StatusEvent(StatusEvent::UpdateStatus(
|
||||||
|
@ -577,6 +581,11 @@ impl Listing {
|
||||||
})
|
})
|
||||||
}) {
|
}) {
|
||||||
ListingComponent::from(index_style)
|
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 {
|
} else {
|
||||||
Conversations(Default::default())
|
Conversations(Default::default())
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue