summaryrefslogtreecommitdiffstats
path: root/ui/src/components/mail/listing.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-11-23 18:00:00 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-11-23 19:34:16 +0200
commit874a252394f8210aae723941d9c95309271c7f13 (patch)
treea55917a17828843367acd6efc5e435c34c7db78f /ui/src/components/mail/listing.rs
parent12e4258ae42da5029e13b245ed6861db670fe4b4 (diff)
ui: add periodic account connectivity check
1. spawn thread to send ThreadPulses to the main event loop that "parks" until unparked from State 2. State unparks thread if there are accounts that are offline 3. thread sends ThreadPulse and parks again 4. State checks accounts again and so on.
Diffstat (limited to 'ui/src/components/mail/listing.rs')
-rw-r--r--ui/src/components/mail/listing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs
index 8b4c3471..ab28aba6 100644
--- a/ui/src/components/mail/listing.rs
+++ b/ui/src/components/mail/listing.rs
@@ -222,7 +222,6 @@ impl Component for Listing {
.dirty_areas
.push_back(((mid, get_y(upper_left)), (mid, get_y(bottom_right))));
}
- self.dirty = false;
if right_component_width == total_cols {
if !context.is_online(self.cursor_pos.0) {
@@ -278,6 +277,7 @@ impl Component for Listing {
}
}
}
+ self.dirty = false;
}
fn process_event(&mut self, event: &mut UIEvent, context: &mut Context) -> bool {
if match self.component {
@@ -468,7 +468,7 @@ impl Component for Listing {
self.dirty = true;
}
UIEvent::Resize => {
- self.dirty = true;
+ self.set_dirty();
}
UIEvent::Input(Key::Up) => {
let amount = if self.cmd_buf.is_empty() {