euphuckingwrecka

This commit is contained in:
🪞👃🪞 2025-05-18 18:54:30 +03:00
parent 3e9545fe26
commit 7746abc9ee
5 changed files with 92 additions and 86 deletions

View file

@ -179,6 +179,9 @@ impl App {
fn focus_editor (&self) -> bool {
self.project.editor.is_some()
}
fn focus_dialog (&self) -> bool {
self.dialog.is_some()
}
fn focus_message (&self) -> bool {
matches!(self.dialog, Some(Dialog::Message(..)))
}
@ -451,13 +454,11 @@ impl Configuration {
let cond = cond.unwrap();
println!("ok");
map.add_layer_if(
Box::new(move |state|{
let mut exp = exp.clone();
let value = Context::get(state, &mut format!(":{cond}").as_str().into()).unwrap_or(false);
if value {
panic!("layer-if cond={cond:?} exp={exp:?} value={value:?}");
}
value
Box::new(move |state: &App|{
Context::get(state,
&mut format!("{cond}").as_str().into())
.unwrap_or_else(||panic!(
"missing input layer conditional {cond} from {exp:?}"))
}),
keys
);