mobx.dart icon indicating copy to clipboard operation
mobx.dart copied to clipboard

Feat: Allow a custom equals parameter for ObservableStream

Open amondnet opened this issue 3 years ago • 4 comments

Create a custom equals parameter for ObservableStream, like what exists already for Observable.

Currently, ObservableStream uses == to determine if the value changed. This creates an option to override that with a different EqualityComparator.

https://github.com/mobxjs/mobx.dart/blob/f8677da98b2077ae22b536abe3ea11be2ba8050e/mobx/lib/src/api/async/observable_stream.dart#L439

https://github.com/mobxjs/mobx.dart/blob/f8677da98b2077ae22b536abe3ea11be2ba8050e/mobx/lib/src/core/observable.dart#L62

https://github.com/mobxjs/mobx.dart/blob/f8677da98b2077ae22b536abe3ea11be2ba8050e/mobx/lib/src/core/observable.dart#L106

https://github.com/mobxjs/mobx.dart/issues/679

amondnet avatar Mar 08 '22 06:03 amondnet

Deploy Preview for mobx failed.

Name Link
Latest commit e84f05e5207d8c645a366bd0943c848b43b7b472
Latest deploy log https://app.netlify.com/sites/mobx/deploys/633aa6dffe89f5000896186d

netlify[bot] avatar Mar 08 '22 06:03 netlify[bot]

Codecov Report

Merging #771 (e84f05e) into master (cea7013) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #771   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files          55       55           
  Lines        1920     1923    +3     
=======================================
+ Hits         1899     1902    +3     
  Misses         21       21           
Flag Coverage Δ
flutter_mobx 100.00% <ø> (ø)
mobx 98.45% <100.00%> (+<0.01%) :arrow_up:
mobx_codegen 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mobx/lib/src/api/async/observable_future.dart 100.00% <100.00%> (ø)
mobx/lib/src/api/async/observable_stream.dart 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cea7013...e84f05e. Read the comment docs.

codecov[bot] avatar Mar 08 '22 06:03 codecov[bot]

Can you resolve conflicts pls before the merge. Also will need to bump up the version for publishing and add to changelog

pavanpodila avatar Sep 18 '22 05:09 pavanpodila

@pavanpodila Done.

amondnet avatar Sep 19 '22 01:09 amondnet

@all-contributors please add @amondnet for doc

amondnet avatar May 10 '23 03:05 amondnet

@amondnet

I've put up a pull request to add @amondnet! :tada:

allcontributors[bot] avatar May 10 '23 03:05 allcontributors[bot]