summaryrefslogtreecommitdiffstats
path: root/src/components/mail/listing/thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mail/listing/thread.rs')
-rw-r--r--src/components/mail/listing/thread.rs28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/components/mail/listing/thread.rs b/src/components/mail/listing/thread.rs
index 6c34a5e0..ed347527 100644
--- a/src/components/mail/listing/thread.rs
+++ b/src/components/mail/listing/thread.rs
@@ -182,17 +182,10 @@ impl MailListingTrait for ThreadListing {
match context.accounts[&self.cursor_pos.0].load(self.cursor_pos.1) {
Ok(_) => {}
Err(_) => {
- let default_cell = {
- let mut ret = Cell::with_char(' ');
- ret.set_fg(self.color_cache.theme_default.fg)
- .set_bg(self.color_cache.theme_default.bg)
- .set_attrs(self.color_cache.theme_default.attrs);
- ret
- };
let message: String =
context.accounts[&self.cursor_pos.0][&self.cursor_pos.1].status();
self.data_columns.columns[0] =
- CellBuffer::new_with_context(message.len(), 1, default_cell, context);
+ CellBuffer::new_with_context(message.len(), 1, None, context);
self.length = 0;
write_string_to_grid(
message.as_str(),
@@ -231,17 +224,10 @@ impl MailListingTrait for ThreadListing {
let threads = account.collection.get_threads(self.cursor_pos.1);
self.length = 0;
self.order.clear();
- let default_cell = {
- let mut ret = Cell::with_char(' ');
- ret.set_fg(self.color_cache.theme_default.fg)
- .set_bg(self.color_cache.theme_default.bg)
- .set_attrs(self.color_cache.theme_default.attrs);
- ret
- };
if threads.len() == 0 {
let message: String = account[&self.cursor_pos.1].status();
self.data_columns.columns[0] =
- CellBuffer::new_with_context(message.len(), 1, default_cell, context);
+ CellBuffer::new_with_context(message.len(), 1, None, context);
write_string_to_grid(
message.as_str(),
&mut self.data_columns.columns[0],
@@ -380,21 +366,21 @@ impl MailListingTrait for ThreadListing {
min_width.0 = idx.saturating_sub(1).to_string().len();
/* index column */
self.data_columns.columns[0] =
- CellBuffer::new_with_context(min_width.0, rows.len(), default_cell, context);
+ CellBuffer::new_with_context(min_width.0, rows.len(), None, context);
/* date column */
self.data_columns.columns[1] =
- CellBuffer::new_with_context(min_width.1, rows.len(), default_cell, context);
+ CellBuffer::new_with_context(min_width.1, rows.len(), None, context);
/* from column */
self.data_columns.columns[2] =
- CellBuffer::new_with_context(min_width.2, rows.len(), default_cell, context);
+ CellBuffer::new_with_context(min_width.2, rows.len(), None, context);
self.data_columns.segment_tree[2] = row_widths.2.into();
/* flags column */
self.data_columns.columns[3] =
- CellBuffer::new_with_context(min_width.3, rows.len(), default_cell, context);
+ CellBuffer::new_with_context(min_width.3, rows.len(), None, context);
/* subject column */
self.data_columns.columns[4] =
- CellBuffer::new_with_context(min_width.4, rows.len(), default_cell, context);
+ CellBuffer::new_with_context(min_width.4, rows.len(), None, context);
self.data_columns.segment_tree[4] = row_widths.4.into();
self.rows = rows;