lbry-desktop/ui/redux/reducers
infinite-persistence 249b73f8c6
Skip muted list update if no change
## Issue
Components render unnecessarily due to reference invalidation from `selectMutedChannels` selector.

## Notes
`selectMutedChannels` run and return a new reference each time the app gains focus. `createSelector` will not help in this case, because we are indeed invalidating the data in the store in `USER_STATE_POPULATE`.

## Changes
- Don't update the state if the array is identical in content.
- Fixed `selectMutedChannels` to return the reference from the store, so `createSelector` is not needed.
    - Also, the filtering is not needed because we've already done it in the reducer.

## Comments
I've done some profiling on large blocklists. The time needed for the array comparison is still an order magnitude lower than the time needed to render all the Components that got incorrectly marked by this.

The ideal solution is for the sync code to return a hash or timestamp of the array, so that we can compare that instead of the array.
2021-10-19 21:15:26 +08:00
..
app.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
blocked.js Skip muted list update if no change 2021-10-19 21:15:26 +08:00
claims.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
coinSwap.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
collections.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
comments.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
content.js recsys v0.2 (#6977) 2021-09-02 18:39:40 -04:00
file_info.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
livestream.js Livestream category improvements (#7115) 2021-09-24 10:26:21 -04:00
notifications.js fetch notofication/categories for notification types dropdown 2021-04-30 12:45:46 -04:00
publish.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
reactions.js add file reactions code from odysee 2020-10-02 15:28:00 -04:00
reportContent.js Add 'ReportContent' actions/reducers/selectors 2021-04-21 10:49:31 -04:00
rewards.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
search.js send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
subscriptions.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
sync.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
tags.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
user.js Clear 'passwordSet*' flags too in USER_PASSWORD_SET_CLEAR 2020-09-15 12:52:12 -04:00
wallet.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00