File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 3
3
## Upcoming
4
4
5
5
- refactor: remove ` WithState ` as it wasn't doing anything beyond ` functools.wraps `
6
+ - refactor: autorun doesn't inform subscribers when the output value is not changed
6
7
7
8
## Version 0.22.2
8
9
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ def _call(
270
270
** kwargs ,
271
271
)
272
272
create_task = self ._store ._create_task # noqa: SLF001
273
+ previous_value = self ._latest_value
273
274
if iscoroutine (value ) and create_task :
274
275
if self ._options .auto_await :
275
276
future = Future ()
@@ -294,7 +295,8 @@ def _call(
294
295
)
295
296
else :
296
297
self ._latest_value = value
297
- self .inform_subscribers ()
298
+ if self ._latest_value is not previous_value :
299
+ self .inform_subscribers ()
298
300
299
301
def __call__ (
300
302
self : Autorun [
You can’t perform that action at this time.
0 commit comments