fixed buffer logic

This commit is contained in:
Priec
2025-08-22 14:26:58 +02:00
parent 414c6957e7
commit 00dad5d673
5 changed files with 24 additions and 29 deletions

View File

@@ -2,9 +2,7 @@
pub mod ui;
pub mod render;
pub mod rat_state;
pub mod context;
pub use ui::run_ui;
pub use rat_state::*;
pub use context::*;

View File

@@ -1,24 +0,0 @@
// client/src/ui/handlers/rat_state.rs
use crossterm::event::{KeyCode, KeyModifiers};
use crate::config::binds::config::Config;
use crate::state::app::state::UiState;
pub struct UiStateHandler;
impl UiStateHandler {
pub fn toggle_buffer_list(
ui_state: &mut UiState,
config: &Config,
key: KeyCode,
modifiers: KeyModifiers,
) -> bool {
if let Some(action) = config.get_common_action(key, modifiers) {
if action == "toggle_buffer_list" {
ui_state.show_buffer_list = !ui_state.show_buffer_list;
return true;
}
}
false
}
}