Skip to content

Commit

Permalink
This might actually work and make sense too.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juraj Kirchheim committed Nov 6, 2023
1 parent 5bea3c7 commit acb9ac1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/tink/state/State.hx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,11 @@ private class SimpleState<T> extends Invalidator implements StateObject<T> {
warn('Updating state in a binding');
#end

Scheduler.atomically(() ->
if (!comparator.eq(value, this.value)) {
if (!comparator.eq(value, this.value))
Scheduler.atomically(() -> {
this.value = value;
fire();
}
);
}, true);

return value;
}
Expand Down

0 comments on commit acb9ac1

Please sign in to comment.