mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 09:36:42 +01:00
collect emitted tasks
This commit is contained in:
parent
859da8e5d1
commit
e16e8131aa
1 changed files with 6 additions and 2 deletions
|
|
@ -39,10 +39,14 @@ macro_rules! setter {
|
||||||
) {
|
) {
|
||||||
if let Some(entries) = entries_under(&mut state.entries, index) {
|
if let Some(entries) = entries_under(&mut state.entries, index) {
|
||||||
for entry in entries.iter() {
|
for entry in entries.iter() {
|
||||||
entry.write().unwrap().$name(&value);
|
if let Some(task) = entry.write().unwrap().$name(&value) {
|
||||||
|
state.tasks.push(task);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
} else if let Some(entry) = state.entries.get_mut(index) {
|
} else if let Some(entry) = state.entries.get_mut(index) {
|
||||||
entry.$name(&value);
|
if let Some(task) = entry.$name(&value) {
|
||||||
|
state.tasks.push(task);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$name
|
$name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue