conversations.rs: fix constant redrawing

self.force_draw was not reset back to false after drawing, so it was
constantly being redrawn until meli becomes unresponsive.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/381/head
Manos Pitsidianakis 3 weeks ago
parent 11a0586d56
commit bc1b65316d
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -512,6 +512,7 @@ impl ListingTrait for ConversationsListing {
context, context,
); );
self.force_draw = false;
context.dirty_areas.push_back(area); context.dirty_areas.push_back(area);
} }
@ -1282,6 +1283,11 @@ impl Component for ConversationsListing {
let shortcuts = self.shortcuts(context); let shortcuts = self.shortcuts(context);
match (&event, self.focus) { match (&event, self.focus) {
(UIEvent::VisibilityChange(true), _) => {
self.force_draw = true;
self.set_dirty(true);
return true;
}
(UIEvent::Input(ref k), Focus::Entry) (UIEvent::Input(ref k), Focus::Entry)
if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"]) => if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"]) =>
{ {

Loading…
Cancel
Save