mobxjs / mobx.dart

MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.
https://mobx.netlify.app
MIT License
2.39k stars 310 forks source link

fix: observableset and observablemap notify all listeners when one is added with fireimmediately true #962

Closed amondnet closed 9 months ago

amondnet commented 9 months ago

Describe the changes proposed in this Pull Request.

If the PR fixes a specific issue, reference the issue with Fixes #.

Fixes #956


Pull Request Checklist

netlify[bot] commented 9 months ago

Deploy Preview for mobx canceled.

Name Link
Latest commit c9e74ade369d34202ff0ef0ce007b0d2b06db7b0
Latest deploy log https://app.netlify.com/sites/mobx/deploys/65682c8c5cdadd000823bbd0
codecov[bot] commented 9 months ago

Codecov Report

Merging #962 (c9e74ad) into main (74e4a89) will increase coverage by 0.00%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962/graphs/tree.svg?width=650&height=150&src=pr&token=YjGMFvwbrl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs)](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) ```diff @@ Coverage Diff @@ ## main #962 +/- ## ======================================= Coverage 98.99% 99.00% ======================================= Files 57 57 Lines 1998 2000 +2 ======================================= + Hits 1978 1980 +2 Misses 20 20 ``` | [Flag](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | Coverage Δ | | |---|---|---| | [flutter_mobx](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | `100.00% <ø> (ø)` | | | [mobx](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | `98.55% <100.00%> (+<0.01%)` | :arrow_up: | | [mobx_codegen](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | `100.00% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | Coverage Δ | | |---|---|---| | [...src/api/observable\_collections/observable\_map.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieC9saWIvc3JjL2FwaS9vYnNlcnZhYmxlX2NvbGxlY3Rpb25zL29ic2VydmFibGVfbWFwLmRhcnQ=) | `100.00% <100.00%> (ø)` | | | [...src/api/observable\_collections/observable\_set.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieC9saWIvc3JjL2FwaS9vYnNlcnZhYmxlX2NvbGxlY3Rpb25zL29ic2VydmFibGVfc2V0LmRhcnQ=) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs). Last update [74e4a89...c9e74ad](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/962?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs).