lbry-desktop/flow-typed
infinite-persistence 157b50c58e
Upload: tab sync and various fixes (#428)
* Upload: fix redux key clash

## Issue
`params` is the "final" value that will be passed to the SDK and  `channel` is not a valid argument (it should be `channel_name`). Also, it seems like we only pass the channel ID now and skip the channel name entirely.

For the anonymous case, a clash will still happen when since the channel part is hardcoded to `anonymous`.

## Approach
Generate a guid in `params` and use that as the key to handle all the cases above. We couldn't use the `uploadUrl` because v1 doesn't have it.

The old formula is retained to allow users to retry or cancel their existing uploads one last time (otherwise it will persist forever). The next upload will be using the new key.

* Upload: add tab-locking

## Issue
- The previous code does detect uploads from multiple tabs, but it was done by handling the CONFLICT error message from the backend. At certain corner-cases, this does not work well. A better way is to not allow resumption while the same file is being uploading from another tab.

- When an upload from 1 tab finishes, the GUI on the other tab does not remove the completed item. User either have to refresh or click Cancel. Clicking Cancel results in the 404 backend error. This should be avoided.

## Approach
- Added tab synchronization and locking by passing the "locked" and "removed" information through `localStorage`.

## Other considered approaches
- Wallet sync -- but decided not to pollute the wallet.
- 3rd-party redux tab syncing -- but decided it's not worth adding another module for 1 usage.

* Upload: check if locked before confirming delete

## Reproduce
Have 2 tabs + paused upload
Open "cancel" dialog in one of the tabs.
Continue upload in other tab
Confirm cancellation in first tab
Upload disappears from both tabs, but based on network traffic the upload keeps happening.
(If upload finishes the claim seems to get created)
2021-12-07 09:48:09 -05:00
..
npm flow fixes 2020-12-16 10:52:22 -05:00
18nj.js pr feedback 2019-10-01 01:48:43 -04:00
Blocklist.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
bluebird.js Fix Flow config 2017-12-07 17:04:19 -03:00
Claim.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
classnames.js Fix Flow config 2017-12-07 17:04:19 -03: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
Comment.js Block: pass comment ID for deletion when being blocked. (#255) 2021-11-09 09:43:02 -05:00
content.js Fix floating player issues (#7073) 2021-09-13 11:24:35 -04:00
electron.js Fix Flow config 2017-12-07 17:04:19 -03:00
File.js move file actions from lbry-redux 2021-10-06 10:22:49 -04:00
formik.js Fix Flow config 2017-12-07 17:04:19 -03:00
homepage.js pinning 2021-07-22 23:24:55 -04:00
i18n.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
Lbry.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
LbryFirst.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
lbryURI.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
location.js 0.36.0 sdk changes 2019-04-24 10:02:52 -04:00
notification.js delete duplicate flow type files (#105) 2021-10-20 13:33:31 -05:00
publish.js Upload: tab sync and various fixes (#428) 2021-12-07 09:48:09 -05:00
qrcode.react.js Fix Flow config 2017-12-07 17:04:19 -03:00
react-markdown.js implement app redesign 2018-03-26 14:32:43 -07:00
react-modal.js implement app redesign 2018-03-26 14:32:43 -07:00
react-paginate.js implement app redesign 2018-03-26 14:32:43 -07:00
react-simplemde-editor.js implement app redesign 2018-03-26 14:32:43 -07:00
react-transition-group.js implement app redesign 2018-03-26 14:32:43 -07:00
redux.js delete duplicate flow type files (#105) 2021-10-20 13:33:31 -05:00
Reflector.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
reportContent.js Add 'ReportContent' actions/reducers/selectors 2021-04-21 10:49:31 -04:00
reselect.js implement app redesign 2018-03-26 14:32:43 -07:00
reward.js feat: daily reward 2019-09-05 09:40:42 -04:00
search.js send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
shapeshift.io.js Fix Flow config 2017-12-07 17:04:19 -03:00
subscription.js Feat publish replays on master (#5863) 2021-04-14 00:06:11 -04:00
Tags.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
Transaction.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
Txo.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
user.js make flow shut up 2021-07-05 10:02:03 -04:00
web-file.js fix WebFile flow type 2020-08-13 11:11:23 -04:00
web.js replace insufficient credits modal with inline ui elements 2019-04-03 00:17:00 -04:00