refactor(api): put a SessionApi seam between the commands, the TUI, and the client
Commands and the TUI now hold an Arc<dyn SessionApi> instead of an Arc<Client>. The trait is implemented on Client itself, so the local path is the same client behind one vtable and no wrapper type exists to keep in sync. Daemon mode plugs a remote implementation into the same handle.
This commit is contained in:
@@ -264,7 +264,7 @@ impl MainTui {
|
||||
// it renders the messages and the compose line itself.
|
||||
let area = centered_rect(70, 60, frame.area());
|
||||
frame.render_widget(ratatui::widgets::Clear, area);
|
||||
render_chat_pane(frame, area, &self.state, self.client.username());
|
||||
render_chat_pane(frame, area, &self.state, &self.client.username());
|
||||
}
|
||||
|
||||
/// Context shortcuts for the chat-rooms popup.
|
||||
|
||||
Reference in New Issue
Block a user