summaryrefslogtreecommitdiffstats
path: root/ui/src/components/mail/listing/plain.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/mail/listing/plain.rs')
-rw-r--r--ui/src/components/mail/listing/plain.rs23
1 files changed, 14 insertions, 9 deletions
diff --git a/ui/src/components/mail/listing/plain.rs b/ui/src/components/mail/listing/plain.rs
index 6e45d07a..b022b91e 100644
--- a/ui/src/components/mail/listing/plain.rs
+++ b/ui/src/components/mail/listing/plain.rs
@@ -105,17 +105,15 @@ impl PlainListing {
}
self.cursor_pos.0 = self.new_cursor_pos.0;
self.cursor_pos.1 = self.new_cursor_pos.1;
+ let folder_hash = context.accounts[self.cursor_pos.0].folders_order[self.cursor_pos.1];
// Inform State that we changed the current folder view.
- context.replies.push_back(UIEvent::RefreshMailbox((
- self.cursor_pos.0,
- self.cursor_pos.1,
- )));
+ context
+ .replies
+ .push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
// Get mailbox as a reference.
//
- // Get mailbox as a reference.
- //
- match context.accounts[self.cursor_pos.0].status(self.cursor_pos.1) {
+ match context.accounts[self.cursor_pos.0].status(folder_hash) {
Ok(_) => {}
Err(_) => {
self.content = CellBuffer::new(MAX_COLS, 1, Cell::with_char(' '));
@@ -505,13 +503,20 @@ impl Component for PlainListing {
self.view = None;
}
UIEvent::MailboxUpdate((ref idxa, ref idxf))
- if *idxa == self.new_cursor_pos.0 && *idxf == self.new_cursor_pos.1 =>
+ if (*idxa, *idxf)
+ == (
+ self.new_cursor_pos.0,
+ context.accounts[self.new_cursor_pos.0].folders_order
+ [self.new_cursor_pos.1],
+ ) =>
{
self.refresh_mailbox(context);
self.set_dirty();
}
UIEvent::StartupCheck(ref f)
- if context.mailbox_hashes[f] == (self.new_cursor_pos.0, self.new_cursor_pos.1) =>
+ if *f
+ == context.accounts[self.new_cursor_pos.0].folders_order
+ [self.new_cursor_pos.1] =>
{
self.refresh_mailbox(context);
self.set_dirty();