mail/listing: check row_updates in is_dirty()
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m0s
Details
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m3s
Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m10s
Details
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m0s
Details
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m3s
Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m10s
Details
If there are row_updates, it means we need to redraw. But in the draw() call, we check is_dirty() to decide whether to proceed drawing. Add row_updates not being empty into the dirty conditions. Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/331/head
parent
933bf157ae
commit
0da97dd8c1
|
@ -2118,11 +2118,12 @@ impl Component for CompactListing {
|
|||
}
|
||||
|
||||
fn is_dirty(&self) -> bool {
|
||||
self.force_draw
|
||||
|| match self.focus {
|
||||
Focus::None | Focus::Entry => self.dirty,
|
||||
Focus::EntryFullscreen => false,
|
||||
match self.focus {
|
||||
Focus::None | Focus::Entry => {
|
||||
self.dirty || self.force_draw || !self.rows.row_updates.is_empty()
|
||||
}
|
||||
Focus::EntryFullscreen => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn set_dirty(&mut self, value: bool) {
|
||||
|
|
|
@ -1229,11 +1229,21 @@ impl Component for ConversationsListing {
|
|||
}
|
||||
if self.force_draw {
|
||||
// Draw the entire list
|
||||
let area = if matches!(self.focus, Focus::Entry) {
|
||||
area.take_cols(area.width() / 3)
|
||||
} else {
|
||||
area
|
||||
};
|
||||
self.draw_list(grid, area, context);
|
||||
self.force_draw = false;
|
||||
}
|
||||
} else {
|
||||
// Draw the entire list
|
||||
let area = if matches!(self.focus, Focus::Entry) {
|
||||
area.take_cols(area.width() / 3)
|
||||
} else {
|
||||
area
|
||||
};
|
||||
self.draw_list(grid, area, context);
|
||||
}
|
||||
}
|
||||
|
@ -1510,8 +1520,9 @@ impl Component for ConversationsListing {
|
|||
|
||||
fn is_dirty(&self) -> bool {
|
||||
match self.focus {
|
||||
Focus::None => self.dirty,
|
||||
Focus::Entry => self.dirty,
|
||||
Focus::None | Focus::Entry => {
|
||||
self.dirty || self.force_draw || !self.rows.row_updates.is_empty()
|
||||
}
|
||||
Focus::EntryFullscreen => false,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1835,11 +1835,12 @@ impl Component for PlainListing {
|
|||
}
|
||||
|
||||
fn is_dirty(&self) -> bool {
|
||||
self.force_draw
|
||||
|| match self.focus {
|
||||
Focus::None | Focus::Entry => self.dirty,
|
||||
Focus::EntryFullscreen => false,
|
||||
match self.focus {
|
||||
Focus::None | Focus::Entry => {
|
||||
self.dirty || self.force_draw || !self.rows.row_updates.is_empty()
|
||||
}
|
||||
Focus::EntryFullscreen => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn set_dirty(&mut self, value: bool) {
|
||||
|
|
|
@ -1682,8 +1682,9 @@ impl Component for ThreadListing {
|
|||
|
||||
fn is_dirty(&self) -> bool {
|
||||
match self.focus {
|
||||
Focus::None => self.dirty,
|
||||
Focus::Entry => self.dirty,
|
||||
Focus::None | Focus::Entry => {
|
||||
self.dirty || self.force_draw || !self.rows.row_updates.is_empty()
|
||||
}
|
||||
Focus::EntryFullscreen => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue