summaryrefslogtreecommitdiffstats
path: root/ui/src/state.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2018-09-15 20:09:41 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-06-10 19:40:34 +0300
commit47481e72dafe2a9095b12471e138f54a4dcbc1e7 (patch)
treef3372f58b9812c4178243a8b2e0ffdaa692e3c29 /ui/src/state.rs
parentb2e91a83bd7f21b75fbf3494b65b926bf8e7907e (diff)
melib: Prune empty containers while threading
Diffstat (limited to 'ui/src/state.rs')
-rw-r--r--ui/src/state.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/src/state.rs b/ui/src/state.rs
index fae5865b..24ae50f4 100644
--- a/ui/src/state.rs
+++ b/ui/src/state.rs
@@ -243,6 +243,10 @@ impl State {
pub fn refresh_event(&mut self, event: RefreshEvent) {
let hash = event.hash();
if let Some(&(idxa, idxm)) = self.context.mailbox_hashes.get(&hash) {
+ if self.context.accounts[idxa].status(idxm).is_err() {
+ self.context.replies.push_back(UIEvent::from(event));
+ return;
+ }
if let Some(notification) = self.context.accounts[idxa].reload(event, idxm) {
self.context.replies.push_back(UIEvent {
id: 0,