layout: Remove unused code

This commit is contained in:
Dorota Czaplejewicz
2021-04-05 11:09:35 +00:00
parent 2b7e8f829e
commit 99c04fd8f5

View File

@ -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<Rc<RefCell<KeyState>>> {
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,