summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-09-06 12:54:12 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-09-15 13:21:14 +0300
commit335a1011de42bd1ae450a07ffafc57312bf794f8 (patch)
tree142cd22c2e6d24746873fd6f9778aedfcf00822b /ui
parentc3e3c98fb07c69e053d7a9a5fcfd3fcf03f457d9 (diff)
imap: add watch
Diffstat (limited to 'ui')
-rw-r--r--ui/src/components/mail/view/thread.rs3
-rw-r--r--ui/src/conf/accounts.rs1
2 files changed, 3 insertions, 1 deletions
diff --git a/ui/src/components/mail/view/thread.rs b/ui/src/components/mail/view/thread.rs
index 0171bdc4..7c74c0a0 100644
--- a/ui/src/components/mail/view/thread.rs
+++ b/ui/src/components/mail/view/thread.rs
@@ -869,6 +869,9 @@ impl fmt::Display for ThreadView {
impl Component for ThreadView {
fn draw(&mut self, grid: &mut CellBuffer, area: Area, context: &mut Context) {
let total_cols = width!(area);
+ if self.entries.is_empty() {
+ return;
+ }
/* If user has selected another mail to view, change to it */
if self.new_expanded_pos != self.expanded_pos {
diff --git a/ui/src/conf/accounts.rs b/ui/src/conf/accounts.rs
index 22748b86..4f84f8eb 100644
--- a/ui/src/conf/accounts.rs
+++ b/ui/src/conf/accounts.rs
@@ -40,7 +40,6 @@ use crate::types::UIEvent::{self, EnvelopeRemove, EnvelopeRename, EnvelopeUpdate
use std::collections::VecDeque;
use std::fs;
use std::io;
-use std::mem;
use std::ops::{Index, IndexMut};
use std::result;
use std::sync::Arc;