diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-03-02 12:06:19 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-03-02 12:06:19 +0200 |
commit | 651dda67cf3e96270b8f4bbbfba4519fc9e66cd5 (patch) | |
tree | 1b3880978555e3ead1d8e5123569ac0488b2ed4a /src/state.rs | |
parent | 106dae3334093386611e5bdd74f6dfcade1c819d (diff) |
Respect autoload mailbox setting
Diffstat (limited to 'src/state.rs')
-rw-r--r-- | src/state.rs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/state.rs b/src/state.rs index c4e9cd6e..e5a4db9b 100644 --- a/src/state.rs +++ b/src/state.rs @@ -37,7 +37,6 @@ use fnv::FnvHashMap; use smallvec::SmallVec; use std::env; use std::io::Write; -use std::result; use std::thread; use termion::raw::IntoRawMode; use termion::screen::AlternateScreen; @@ -129,20 +128,6 @@ impl Context { pub fn restore_input(&self) { self.input.restore(self.sender.clone()); } - pub fn account_status( - &mut self, - idx_a: usize, - mailbox_hash: MailboxHash, - ) -> result::Result<(), usize> { - match self.accounts[idx_a].status(mailbox_hash) { - Ok(()) => { - self.replies - .push_back(UIEvent::MailboxUpdate((idx_a, mailbox_hash))); - Ok(()) - } - Err(n) => Err(n), - } - } pub fn is_online(&mut self, account_pos: usize) -> Result<()> { let Context { @@ -379,7 +364,7 @@ impl State { pub fn refresh_event(&mut self, event: RefreshEvent) { let hash = event.hash(); if let Some(&idxa) = self.context.mailbox_hashes.get(&hash) { - if self.context.accounts[idxa].status(hash).is_err() { + if self.context.accounts[idxa].load(hash).is_err() { self.context.replies.push_back(UIEvent::from(event)); return; } @@ -932,7 +917,7 @@ impl State { } UIEvent::WorkerProgress(mailbox_hash) => { if let Some(&account_idx) = self.context.mailbox_hashes.get(&mailbox_hash) { - let _ = self.context.accounts[account_idx].status(mailbox_hash); + let _ = self.context.accounts[account_idx].load(mailbox_hash); } return; } |