parent
a0b1a079b8
commit
f972f69bad
|
@ -155,6 +155,9 @@ impl MailboxView {
|
|||
self.cursor_pos.1 = self.new_cursor_pos.1;
|
||||
self.cursor_pos.0 = self.new_cursor_pos.0;
|
||||
let folder_hash = context.accounts[self.cursor_pos.0].folders_order[self.cursor_pos.1];
|
||||
context
|
||||
.replies
|
||||
.push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
|
||||
|
||||
// Get mailbox as a reference.
|
||||
//
|
||||
|
@ -582,9 +585,6 @@ impl Component for MailboxView {
|
|||
self.dirty = true;
|
||||
return true;
|
||||
}
|
||||
UIEvent::RefreshMailbox(_) => {
|
||||
self.dirty = true;
|
||||
}
|
||||
UIEvent::MailboxUpdate((ref idxa, ref idxf))
|
||||
if (*idxa, *idxf)
|
||||
== (
|
||||
|
|
|
@ -592,16 +592,24 @@ impl StatusBar {
|
|||
}
|
||||
fn draw_status_bar(&mut self, grid: &mut CellBuffer, area: Area, context: &mut Context) {
|
||||
clear_area(grid, area);
|
||||
let (x, y) = write_string_to_grid(
|
||||
&self.status,
|
||||
grid,
|
||||
Color::Byte(123),
|
||||
Color::Byte(26),
|
||||
area,
|
||||
false,
|
||||
);
|
||||
if let Some(n) = self.notifications.pop_front() {
|
||||
self.dirty = true;
|
||||
write_string_to_grid(&n, grid, Color::Byte(219), Color::Byte(88), area, false);
|
||||
} else {
|
||||
write_string_to_grid(
|
||||
&self.status,
|
||||
&n,
|
||||
grid,
|
||||
Color::Byte(123),
|
||||
Color::Byte(26),
|
||||
area,
|
||||
Color::Byte(219),
|
||||
Color::Byte(88),
|
||||
(
|
||||
(std::cmp::max(x, width!(area).saturating_sub(n.len())), y),
|
||||
bottom_right!(area),
|
||||
),
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue