From 99c04fd8f507c7dd752c826a811a55d509fc6f4d Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 5 Apr 2021 11:09:35 +0000 Subject: [PATCH] layout: Remove unused code --- src/layout.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/layout.rs b/src/layout.rs index 0b8607b0..810bdf18 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -621,12 +621,6 @@ pub enum LatchedState { Not, } -impl LatchedState { - pub fn is_latched(&self) -> bool { - self != &LatchedState::Not - } -} - // TODO: split into sth like // Arrangement (views) + details (keymap) + State (keys) /// State of the UI, contains the backend as well @@ -776,23 +770,6 @@ impl Layout { } } } - - pub fn get_locked_keys(&self) -> Vec>> { - let mut out = Vec::new(); - let view = self.get_current_view(); - for (_, row) in view.get_rows() { - for (_, button) in &row.buttons { - let locked = { - let state = RefCell::borrow(&button.state).clone(); - state.action.is_locked(&self.current_view) - }; - if locked { - out.push(button.state.clone()); - } - } - } - out - } fn apply_view_transition( &mut self,