From 2b90815f65ec37f28156ce286f1bc19a989ccefb Mon Sep 17 00:00:00 2001 From: Joscha Date: Wed, 20 Jul 2022 20:47:28 +0200 Subject: [PATCH] Fix cursor movement not scrolling the messages --- src/ui/chat/tree/cursor.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/chat/tree/cursor.rs b/src/ui/chat/tree/cursor.rs index 1b138d1..dff3988 100644 --- a/src/ui/chat/tree/cursor.rs +++ b/src/ui/chat/tree/cursor.rs @@ -171,6 +171,7 @@ impl> InnerTreeViewState { } _ => {} } + self.make_cursor_visible = true; } pub async fn move_cursor_down(&mut self) { @@ -181,16 +182,20 @@ impl> InnerTreeViewState { self.cursor = Cursor::Bottom; } } + self.make_cursor_visible = true; } pub async fn move_cursor_to_top(&mut self) { if let Some(tree_id) = self.store.first_tree().await { self.cursor = Cursor::Msg(tree_id); + self.make_cursor_visible = true; } } pub async fn move_cursor_to_bottom(&mut self) { self.cursor = Cursor::Bottom; + // Not really necessary; only here for consistency with other methods + self.make_cursor_visible = true; } }