Separate navigation and messaging

This commit is contained in:
Joscha 2022-06-18 17:22:57 +02:00
parent 416b5bf31e
commit 03dfe10f3e
4 changed files with 53 additions and 51 deletions

View file

@ -192,14 +192,13 @@ impl Ui {
match self.visible {
Visible::Main => {
self.chat.handle_navigation(terminal, size, event).await;
self.chat
.handle_key_event(event, terminal, size, crossterm_lock)
.handle_messaging(terminal, crossterm_lock, event)
.await;
}
Visible::Log => {
self.log_chat
.handle_key_event(event, terminal, size, crossterm_lock)
.await;
self.log_chat.handle_navigation(terminal, size, event).await;
}
}