lbry-desktop/ui/redux/reducers
infinite-persistence d7e3127e65 Sync: handle fast-actions being reverted
## Repro
1. Follow a channel.
2. When `preference_set` is sent, unfollow the channel.
3. A few seconds later, the final setting reflects (1) instead of (2).

The current sync loop involves doing a final `sync/get` at the end. While not necessary for the scenario above, the code flow covers various cases, so it's still needed for now.

## Approach
Implement an abort mechanism to the sync-loop.

When syncing from the `buildSharedStateMiddleware` loop, generate an ID for each sync session, and only store the latest one. Pass the ID to the completion-callback (and other places as needed), so we can check if our session is still the latest one before executing the callback.

The check for invalidation can also be placed in more places to cut off the sync process earlier, but it's only done for 2 critical places for now.
2021-12-29 10:32:38 -05:00
..
app.js ChunkLoadError: ask user to reload instead of automatically reloading (#139) 2021-10-27 11:07:06 -04:00
blocked.js Remove "same array" check now that USER_STATE_POPULATE only runs when there is new data. 2021-11-15 07:06:39 -08:00
claims.js byId: update only if claim has new data 2021-11-19 15:59:48 +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 Fix states not updated in an immutable way. 2021-11-10 17:35:29 +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 Add stream start to active live streams, and refactor how data active claim is stored in redux 2021-12-22 13:50:49 -05:00
notifications.js fetch notofication/categories for notification types dropdown 2021-04-30 12:45:46 -04:00
publish.js Publish: fix Resume button not appearing after 'conflict' (#543) 2021-12-20 20:25:15 -05: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 Add back support for Winning Uri 2021-12-09 15:35:40 -05:00
settings.js Re-enable reposts on homepages (#352) 2021-11-24 11:11:25 -05:00
subscriptions.js Fix: unsubsribe action removes all with same name 2021-12-29 09:11:27 -05:00
sync.js Sync: handle fast-actions being reverted 2021-12-29 10:32:38 -05:00
tags.js Remove "same array" check now that USER_STATE_POPULATE only runs when there is new data. 2021-11-15 07:06:39 -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