mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
euphuckingwrecka
This commit is contained in:
parent
3e9545fe26
commit
7746abc9ee
5 changed files with 92 additions and 86 deletions
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue