Commit graph

614 commits

Author SHA1 Message Date
infinite-persistence
ec2bf26817
Fix flow for User/UserState 2022-03-17 13:12:18 +08:00
Rafael
f4fdee8331 socket improvements 2022-03-16 16:36:50 -04:00
Thomas Zarebczan
60c317dedf various fixes 2022-03-16 16:36:50 -04:00
Rafael
6ce9bd5cf7 Fixes 2022-03-16 16:36:50 -04:00
Rafael
b096aad70e Improve livestream claimLink embeds
- Remove embedPlayButton for fileRenderInitiator
- getThumbnailFromClaim from utils function instead of redux
- Improve playingUri
2022-03-16 16:36:50 -04:00
Rafael
6dea79819d livestream + old APIs 2022-03-16 16:36:50 -04:00
infinite-persistence
f7bceb3734
Geo: fetch after authentication since it needs auth_token (#1119) 2022-03-16 11:09:43 -04:00
infinite-persistence
745e40a83e
Move blocker flag to redux
Was trying to save 1 state by assuming the homepage will be in a busy state and the ad-detection code will finish first. But this is not true for those with a small Following count.
2022-03-16 16:48:26 +08:00
infinite-persistence
e9559efe10
FYP: batch resolve results 2022-03-16 10:57:26 +08:00
infinite-persistence
1e67a5cc7f
[on hold recsys work] Recommended For You (#782)
* Factor out lighthouse-result processing code for FYP re-use.

The FYP results will be in the same format as LH.

* Recsys: add ability to pass in specific uuid to use

For FYP, we want to pass the UUID as a param when searching for recommendations. The search comes before the recsys entry creation, so we need to generate the UUID first when searching, and then tell recsys to use that specific ID.

* Redux: fetch and store FYP

Note that the gid cannot be used as "hash" for the uri list -- it doesn't necessarily change when the list changes, so we can't use it to optimize redux.  For now, just always update/render when re-fetched.

* UI for FYP

* Mark rendered FYPs

* Pass the FYP ID down the same way as Collection ID

Not ideal, but at least it's in the same pattern as existing code for now. The whole prop-drilling problem with the claim components will be fixed together later.

* Include 'gid' and 'uuid' in recommendation search

* Allow users to mark recommendations that they dislike

* Pass auth-token to all FYP requests + remove beacon use

beacons are unreliable and often blocked

* Only show FYP for members

* FYP readme page

* small fixes

* fyp

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-03-15 15:07:31 -04:00
infinite-persistence
5445a95c9a
Geoblock: support content claim id as well (#1096) 2022-03-15 14:48:26 -04:00
infinite-persistence
99f87e95e3
Geo blocklist - reimplement with backend support (#1089)
Ticket: 1079 Support geoblocking channels/videos

## Changes
- Replaced the .env version with iapi version.
- Includes 'videos' blocking and custom messages.
2022-03-14 15:15:30 -04:00
Franco Montenegro
69a9245324
6205 remember last used playlist choice odysee (#967)
* Add last used collection to right click menu.

* Small fix for last used collection when it's a published collection.

* Update last used collection when a collection is pending or published.

* Small refactor to get the last used collection.
2022-03-14 09:07:27 -04:00
infinite-persistence
b9d392526c Fix #798: fix action dispatch order in doFetchItemsInCollections
We need to store the resolved claims first before marking COLLECTION_ITEMS_RESOLVE_COMPLETED, otherwise the GUI still sees undefined claims.

798 just accidentally flipped the order due to refactoring, I believe. It's now back to original.
2022-03-12 08:54:43 -05:00
infinite-persistence
f7b598a6e0
Fix total comment count selector
- Move away from `makeSelect*`. This selector doesn't need caching since there is no transformation.
2022-03-11 12:27:28 +08:00
infinite-persistence
6b77cb2bfa
Fix comment count not incremented when it was previously 0
It was causing the nudge to add a comment to still appear after one has just entered a comment.

Ticket: 928
2022-03-11 12:27:27 +08:00
mayeaux
fb3a73d8a7
Membership subscriptions (#812)
Enter: Odysee Premium.
2022-03-09 13:05:37 -05:00
infinite-persistence
b5bd36839e Sidebar: show "last active subs" instead of "by name"
1003
2022-03-04 11:32:00 -05:00
infinite-persistence
4a5e967628 Recommended: fix "no results found" flashing after search
## Cause
When 'selectRecommendedContentForUri' is filtering results against the blocklist, it relies on claim data which could be unresolved yet. It filters to empty results for this scenario, hence the flashing message.

## Change
Just return raw results when claims are not resolved yet, so that the GUI knows it needs to show the placeholders while resolving. After resolving, it'll go through the blocklist filtering again.
2022-03-04 09:40:58 -05:00
infinite-persistence
de0bc8cf99 Recommended: optimize nextUri calculation
Instead of filtering the entire list for a suitable nextUri and then picking the first one, short-circuit when candidate is found.
2022-03-04 08:35:50 -05:00
infinite-persistence
76493d48ee
Missed remaining 'homepages' imports
This is a follow-up for #1016

Still doesn't affect anything at the moment, but this reduce the amount of work needed when we yank out the homepages from our bundle later.
2022-03-04 11:10:08 +08:00
Rafael
5dd457d045 Fix live chat 2022-03-03 11:39:42 -05:00
Rafael
fea79d81fb Rename selector 2022-03-03 11:39:42 -05:00
Rafael
c4a23ff856 Fix batch resolve 2022-03-03 11:39:42 -05:00
Rafael
96e7fda26a Batch-resolve channels on doCommentList fetch 2022-03-03 11:39:42 -05:00
infinite-persistence
66e0b84e12
Grab homepages from the content API (#1016)
Currently, homepages are still build as part of the app, so this change doesn't bring much benefit other than to support the wrapper app.

When the service is moved away from the app, we won't have to rebuild the app when homepages change, and also the ui.js bundle would be smaller without the need to code-split.
2022-03-03 09:22:59 -05:00
infinite-persistence
a14239a9dc Livestream fetch: add language option
The function argument order can be a bit ugly, but putting it at the back as optional param makes it easier to test without affecting existing clients.
2022-02-25 16:53:45 -05:00
saltrafael
2152583816
[Fix] linked uris (#959)
* Fix live claim uri being passed

* Refactor show page

* Fix linked comment being erased
2022-02-24 10:20:07 -05:00
saltrafael
17e3fcc27c
[Fix] revert fileRenderFloating vs Mobile change (#937)
* Bump react-draggable

Old version was giving out console errors for outdated react functions

* Refactor fileRenderFloating

* Merge fileRenderMobile into fileRenderFloating

* Fixes from review

* Attempt fix failed to view live
2022-02-23 16:13:22 -05:00
infinite-persistence
39de1d7e84
Band-aid: warn about AdGuard blocking our CDN (#934)
* Band-aid: warn about AdGuard blocking our CDN

Getting 50-100 errors per day. This will be a band-aid until the AdGuard fixes it.

* update message

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-02-22 14:17:41 -05:00
infinite-persistence
79f1b1242d
Clear search cache instead of full reload on homepage 2nd-click (#930)
## Ticket
lbry-desktop 6841

## Issue
If you are already at the homepage and you click the "Home" or "Odysee" logo again, the entire page reloads, causing the whole startup sequence to re-run (lots of fetches).

This can be annoying when not intended (e.g. clicked too many times), as startup is slow for some and we also lose non-persistent Redux data (for debugging).

I believe the requirement was just to reload the homepage tiles, as they might be showing stale ones after a while. A full reload was the quick-and-easy fix.

## Approach
Best not to touch the complicated `ClaimTilesDiscover`, so just clear the search cache key in this scenario. `ClaimTilesDiscover` will then pick this up and perform a new `claim_search`.
2022-02-21 07:54:23 -05:00
infinite-persistence
80d4d8c57c
Limit channel-creation count from the UI (#886)
## Issue
534 prevent new channel creation over x channels

## Notes
Also handled from the API call (`doCreateChannel`) in case there are other UI components that create channels.
2022-02-16 09:14:08 -05:00
infinite-persistence
88907901a1 Fix livestream date incorrect if short url is used
## Issue
- "https://odysee.com/LIVE:6dd" yields "Live 3 months ago" (incorrect)
- "https://odysee.com/@RekietaLaw:a/LIVE:6dd" yields "Live 30 minutes ago" (correct)

## Approach
Use claim ID instead of uri when searching `activeLivestreams`
2022-02-15 22:16:46 -08:00
saltrafael
60d9acfa55
Hide Wild West for DE (#875) 2022-02-15 12:36:33 -05:00
saltrafael
6fa12bf237
Fix wrong param for selector (#874) 2022-02-15 10:35:39 -05:00
mayeaux
0c4f85fe53
MAKE ODYSEE EVEN MORE BEAUTIFUL (#539)
WE LOVE YOU RAPHAEL FOR MAKING THIS HAPPEN!
2022-02-11 13:50:55 -05:00
Thomas Zarebczan
f943affb19
update reports endpoint. 2022-02-09 15:06:38 -05:00
infinite-persistence
f9a1fcc6a7 Bump thumbnail size to 5MB & check size before upload.
- The previous 2MB was a CDN limit (more of a mistake). That has been increased to a far greater number, so we're setting a more reasonable 5MB limit.
- The previous code checks/shows the "size exceeded" message after the file has been uploaded ... in the `catch` block. This will not work since the CDN now allows a 5MB file.
    - Fixed by checking the size before actually uploading.
2022-02-09 11:14:46 -05:00
Rafael
0394211021 Fixes 2022-02-08 12:35:40 -05:00
Rafael
2b56ca8599 Cleanup CommentCreate 2022-02-08 12:35:40 -05:00
Rafael
c1b84368a9 Fixes
Rename FileReactions index import

Fix fileAction undefined logic

Fix live comment menu

Fix superchats
2022-02-08 12:35:40 -05:00
Rafael
baf51f9c32 Create swipeableDrawer component
- CommentsList needs to return a title with comment amounts
- mobile player dimensions needed to fill in the cover
- hid livestream header for now until figuring out a better presentation
- ~colum-reverse~ was causing problems with MUI's drawer scrolling, so reversed the chat order and made it ~column~ by default
- Hid bottom expand navigation if component not yet opened
- some other style changes in the middle
2022-02-08 12:35:40 -05:00
Rafael
0c47f1daa9 Refactor fileRenderIninitiator component
- Only pass necessary props
- Created new initialize play redux action
- Removed deprecated ~file app download~ keyboard functionality, moved preventDefault to videojs keyboard events to prevent ~space~ moving down the page
2022-02-08 12:35:40 -05:00
Rafael
6443af34a0 Refactor claimAuthor
- channelUrl to cached selector also using claimForUri cached selector
2022-02-08 12:35:40 -05:00
Rafael
5794432288 Refactor fileActions
- moved doPrepareEdit incognito and channel calls to separate action
- same with download
- Tooltips
- No major differences between mobile or default returned components so removed condition since mobile style will be changed later on this branch
2022-02-08 12:35:40 -05:00
David Granado
ce903c9280
Patch to restore position upon returning to video until more fully fleshed out fix can be introduced (#817)
* Patch to restore position upon returning to video until more fully fleshed out fix can be introduced

* Add code to notify other open tabs of position saving

* Fix typo

* Wrap localStorage access in try/catch in event browser settings make it unavailable

* Remove formatting changes

* Move constant from 'pages' to 'player'

* Move dispatch out of try/catch

* Fixed typo
2022-02-07 12:51:26 -05:00
AsadUmar
65ad2df643
fix RESOLVE_URIS_COMPLETED, to have one large action instead of hundr… (#798)
* fix RESOLVE_URIS_COMPLETED, to have one large action instead of hundreds of small ones

* Addressed comments.

* Addressed comments.

* Addressed comments.

Co-authored-by: Asad Umar <au@visuary.fr>
2022-02-07 12:39:12 -05:00
infinite-persistence
fe3a55ff95 Remove custom comments server
- Not used by Web.
- It's basically a revert of Desktop 5459.
2022-02-03 10:24:58 -05:00
Rafael
898376888d Fix 2022-01-27 11:32:01 -05:00
Rafael
6544f4c0b6 Fix resolve mentioned_channels 2022-01-27 11:32:01 -05:00
David Granado
cab4b3aba8 Return empty array rather than null from selectRepliesForParentId 2022-01-27 09:51:45 -05:00
infinite-persistence
7fc66aecb6 Defer user/invite_status from startup
## Issue
Closes 385

## Approach
As mentioned in the ticket, the current places where that info is needed is in the Invites Page and Social Share Component.

1. Invites Page: it is already doing the fetch on mount, so no issue there.
2. Social Share: show spinner until the data is fetched.
2022-01-21 09:19:17 -05:00
Rafael
2340138ab5 Fix failed resolve 2022-01-20 14:02:39 -05:00
infinite-persistence
a8a666383a Remove 'store.user.accessToken' now that we've confirmed nobody uses it. 2022-01-19 13:12:09 -05:00
infinite-persistence
e4658bb044
Fix missing claims in large collection (#726)
## Issue
A huge list like http://localhost:9090/$/list/d91815c1bc8c80a1f354284a8c8e92d84d5f07a6 (193 items) often produces fewer results in the final rendered list.

## Cause
The same list of IDs was passed into `claim_search`, and we just increment the `page`. However, it seems like `claim_search` does not honor the order between each call, and some results from the previous page took the place of the results in the next page.  The total is the same, but there are now duplicates.

## Fix
When batching, slice the ID list ourselves to bypass the problem for now.
2022-01-18 09:33:01 -05:00
infinite-persistence
bdb83b5295
Commentron: *Delegates was failing silently
Added toasts to indicate errors instead of failing silently.
2022-01-18 10:46:18 +08:00
infinite-persistence
c1cb9345ad
Commentron: param updates for moderation.*Delegates
## Reason
https://odysee-workspace.slack.com/archives/C02FMSYF51B/p1642435815038000?thread_ts=1642129696.024400&cid=C02FMSYF51B
Due to unaligned parameters not compliant with Authenticate, ModAuthenticate APIs.

It will still work without this PR as there is a compatibility layer, but should use the correct params moving forward.
2022-01-18 10:43:58 +08:00
infinite-persistence
7989020a04
Corrected mentioned_channels parameter name (#719)
Commentron json params are usually underscored instead of camel-cased.

Double-checked commentron code:

```
// MentionedChannel channels mentioned in comment
type MentionedChannel struct {
	ChannelName string `json:"channel_name"`
	ChannelID   string `json:"channel_id"`
}
```

The parameter should probably also be skipped instead of sending empty array, but leaving as-is for now since that is minor.
2022-01-17 08:44:45 -05:00
infinite-persistence
5dc1d416ef
CHANNEL_UNSUBSCRIBE: handle colon vs. hash uris (#706)
## Ticket
644 investigate following vs subscription preference data

## Issue
- iOS app uses colon for following/subscriptions.
- Front-end code handled the "colon vs. hash" for CHANNEL_SUBSCRIBE, but not for CHANNEL_UNSUBSCRIBE
2022-01-17 08:39:06 -05:00
infinite-persistence
9743f4b49e
Move commentron error mapping to separate file 2022-01-17 10:25:06 +08:00
saltrafael
ea9c7a4a27
[Live Chat] Break down componets for Page Layout + Add ability to Pop Out chat window + Hide chat option (#681)
* Refactor CommentBadge

* Refactor livestreamComment component

* Refactor and split livestreamComment CSS

* Refactor livestreamComments component

* Refactor and split livestreamComments CSS

* Remove never used spinner

* Refactor livestream Page

* Refactor page component

* Refactor livestreamLayout component

* Break apart livestreamComments into separate sibling components

- This helps separating LivestreamComments to deal with only the comments, and the LivestreamLayout to be used for its own Page as a Popout option, and also for a layered approach for mobile

* Create Popout Chat Page, Add Popout Chat Menu Option

* Add Hide Chat option

* sockety improvements

* Websocket changes

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2022-01-14 15:24:16 -05:00
saltrafael
b810e07053
Fix doAbandonClaim (#699)
* Refactor doAbandonClaim parameters to only claim

- Gets txid and nout by default now, and passing claim allows using more data to verify ownership in case of txid:nout failing again
- Unused on modalRemoveCard
- Edited the comment on doCollectionDelete to explain better

* Fix doAbandonClaim failing to select my claim
2022-01-14 14:26:03 -05:00
saltrafael
f3892325ce
Find and Pass mentioned channel name + claim id on comment_create (#690) 2022-01-14 09:50:09 -05:00
infinite-persistence
4ae1df4eb9
Thumb: make CDN limit an env so we can change easily 2022-01-13 13:18:41 +08:00
saltrafael
2575c5d448
[Playlist] Pull in sorting changes from desktop + Add Drag-n-Drop + Handle unavailable/deleted claims (#641)
* Add ordering Icons

* Refactor doCollectionEdit

- It required claims as parameter, when only uris are used to populate the collection, so that was changed to pass down the uris instead.
- There were unused and mostly unnecessary functions inside, for example the parameter claimIds was never used so it would never enter the claimSearch function which again would be used to generate uris, so it's better to just use uris as parameter

* Add List Reordering changes

* Add toggle button for list editing

* Add toggle on content page collection sidebar

* Enable drag-n-drop to re-order list items

https://www.youtube.com/watch?v=aYZRRyukuIw

* Allow removing all unavailable claims from a List

* Fix <g> on icons

* Fix section buttons positioning

* Move preventDefault and stopPropagation to buttons div instead of each button, preventing clicking even if disabled opening the claim

* Change dragging cursor

* Fix sizing

* Fix dragging component

* Restrict dragging to vertical axis

* Ignore shuffle state for ordering

* Fix console errors

* Mobile fixes

* Fix sidebar spacing

* Fix grey on mobile after click
2022-01-12 14:14:12 -05:00
infinite-persistence
8507d07d3e
Remove incorrect comments
- activeChannelClaim is the comment creator, not receiver.
- doSeeNotifications marks a notification as "seen", and not "send a notification".
- Removed comments that are just explaining the syntax.
2022-01-10 09:18:11 +08:00
Thomas Zarebczan
ac93e0c22c
2MB max thumb size messaging (#650) 2022-01-07 14:39:27 -05:00
Dan Peterson
bc38466abf
Add a better solution for 304 browser bug + update naming conventions to better articulate what's happening (#603) 2022-01-06 12:49:49 -05:00
infinite-persistence
50550bfa99
Thumbnail uploads: don't show the extra error info in the GUI 2022-01-06 15:39:52 +08:00
infinite-persistence
57f48f462e
Thumbnail uploads: handle non-JSON responses 2022-01-06 15:39:52 +08:00
infinite-persistence
01459d906a
tus: Get more information from publish errors 2022-01-06 15:39:51 +08:00
infinite-persistence
96c3b727fe
Thumbnail uploads: report file details (#628)
I'm leaving the generic "Unexpected JSON" error alone for now, as I think this should be fixed at Nick's end.
2022-01-05 21:07:54 -05:00
Dan Peterson
bbe68a3319
Add a setting to hide scheduled livestreams from home/following (#626)
* Add a setting to hide scheduled livestreams from home/following

* Add a hide button in the scheduled stream header.

* Fix typo + make sure pref is synced
2022-01-05 16:20:43 -05:00
Thomas Zarebczan
4624188a85
fix new channel creation crash 2022-01-05 13:58:36 -05:00
infinite-persistence
39a4cb3d77 Switch thumbnail server: spee.ch --> vanwanet 2022-01-05 11:49:41 -05:00
Dan Peterson
a021475128 Add an isScheduled state to publish form + use it to set the initial state of the date/time controls 2022-01-05 11:20:57 -05:00
Dan Peterson
16e99fc063 Additional filtering of internal tags 2022-01-05 11:20:57 -05:00
infinite-persistence
6583b6a636 Sync: fix new user sign up flow
## Issue
- When signing up, the "channel suggestions" page was stuck because `prefsReady` was never set as `preference_get` was never called.
- It was never called due to the optimizations to skip it when there is no difference between the local and server wallet.

## Change
- The first ever `sync/get` will result in a "no wallet" error, and there is already a `catch` to handle it. But the change in 38c13cf5 caused the `catch` to be skipped and went directly to `sync_apply` instead. Although the `catch` is also doing the same thing (`sync_apply`), it also has an additional callback to call `preference_get`.
    - Fixed by ensuring this scenario ends up in the `catch` block like it was originally intended.
- We also did some optimization in the callback to skip the final `preference_get` if there is no difference in hash. But for the case of signing up, we do want to run it (so that `prefsReady` and other stuff gets initialized), so pass `hasNewData = true` to the callback.
2022-01-05 04:00:12 -05:00
infinite-persistence
d03f80c6b1 Skip 'install/new' if web already exists
## Issue
Part of 385 "Defer api.odysee.com calls to their respective pages / install new"
2022-01-04 08:54:30 -05:00
infinite-persistence
1f5f8f1213 Remove unused firebase and domain parameter 2022-01-04 08:54:30 -05:00
infinite-persistence
e5a2e3961e Remove unused items 2022-01-04 08:54:30 -05:00
infinite-persistence
1cc2132a28 Uploads: prevent perpetual locked upload
## Issue
- Closes 592 Force clear stuck upload
- It was possible for an upload to stay "locked" e.g. when browser is killed.

## Change
When refreshing or opening a new tab, always clear the locks. The on-going sessions will re-lock them immediately.
2022-01-03 12:10:55 -05:00
infinite-persistence
449398b88f
Lint/format 2022-01-03 17:01:10 +08:00
infinite-persistence
5948ee0d80
i18n: restore ability to retrieve new i18n strings
## Issue
In the original Desktop code, new strings encountered during runtime will be automatically added to the local `app-strings.json` file. The feature is unavailable in Web because writing to file would require explicit permissions.

## Change
Partially restore the functionality by saving the strings to memory and retrieving it from the console via `copy(window.new_strings)`. It's a little bit of manual work, but I think it is good as it forces a sanity check before committing (previously, experimental/developmental strings are committed and being translated in Transifex).
2022-01-03 10:36:12 +08:00
Thomas Zarebczan
ce37e06e10 Revert "Fix publish form when editing livestream (#565)"
This reverts commit da06c14e60.
2021-12-31 13:28:19 -05:00
Dan Peterson
da06c14e60
Fix publish form when editing livestream (#565)
* Update publish form when editing livestream + update to radios for liveststream release time

* Fix bug where upload tools may remain visible upon switching upload type, even when no option to upload is available.

* move publish source state up, when editing livestream only show scheduling option when source is none.

* Reset any set release time if switching to live stream mode.

* Update date/time cmpnts to reset any chnages they made on umount. Update schedule date/time cmpnt to clear release time when selecting anytime option.

* Additional filtering of internal tags

* Default to replay view when editing a liveststream
2021-12-31 11:20:54 -06:00
Dan Peterson
a96d2a47be Create new anytime form state to explicitly set to release to now. Clear internal scheduled tag when editing. 2021-12-30 15:21:59 -05:00
Dan Peterson
33cce4bbcd Update so that any edited streams without a date/time change still get the tag if needed. 2021-12-30 15:21:59 -05:00
Dan Peterson
356c5bf30f - Add a system-level tag for scheduled live streams
- Query for that tag in the upcoming section
- Improve special tag organization
- Filter out the internal tags in the UI
- Add missing types to publish state
2021-12-30 15:21:59 -05:00
infinite-persistence
0ccf9f2c05 Handle removed livestream comments 2021-12-30 11:55:44 -05:00
infinite-persistence
39a0beb4ee Remove channel_list from end of Sync Loop
## Issue
- Slow for users with many channels.
- The need to do it in Sync Loop is more applicable to Desktop.

## Approach
- Just remove it from sync loop.
- It will still be called when entering `/$/channels`, so that's an alternative to fix things when it is out of sync.
2021-12-29 21:16:20 -05:00
Dan Peterson
c22a3048dc Make sure user is available (ie. backend api not down) 2021-12-29 15:45:10 -05:00
infinite-persistence
b6d21692e6 Fix broken startup sync-lock
## Issue
In 38c13cf5, an additional `doGetAndPopulatePreferences` was added in `doSignIn` to ensure we have populated the preferences at least once. With that, `doHandleSyncComplete` can skip `doGetAndPopulatePreferences` is there is no change in the hash.

The addition broke the "initial sync lock", thus incorrectly allowing users to change preferences when the process is not completed.

## Change
I think the additional call is no longer needed since we now store a local hash for comparison, so `doGetAndPopulatePreferences` wouldn't be incorrectly skipped in the first ever `doHandleSyncComplete`.
2021-12-29 10:32:38 -05:00
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
infinite-persistence
b0bea66b1d ClaimTilesDiscover: optimize props to reduce renders
Props: either use primitives, stable references or memoized objects to reduce renders. This update will simplify the existing `areEqual`. It is still needed though as some props are hard to memoize from where they are called, or should simply be ignore.
2021-12-29 09:32:01 -05:00
infinite-persistence
b1f4a2a590 Defer notification/categories
## Ticket
Part of "#385 Defer api.odysee.com calls to their respective pages / install new"

## Change
Pull out `notification/categories` from `doNotificationList` and fetch it in Notifications Page. I don't there there are other places that need it for now.
2021-12-29 09:15:06 -05:00
infinite-persistence
c5e690c657 Fix: unsubsribe action removes all with same name
## Repro
- Do a search like "Test" and filter to "Channels Only".
- Follow a bunch @test channels
- Unfollow any one of them. All of them gets unfollowed.

## Notes
The change in b9fc9b63 to compare the lower-case channel name probably made it even worse, since "@TeSt" would be removed too.

## Change
Not sure why channel name was used in the first place ... perhaps it was to cover canon vs perm uri?

Anyway, comparing uri makes more sense, so doing that instead.
2021-12-29 09:11:27 -05:00
infinite-persistence
c04023948b Replace weekly watch search loop with new last_claimed 2021-12-29 09:04:26 -05:00
Dan Peterson
ea1691609b throw cust error only when failing to parse json 2021-12-23 20:59:08 -05:00
Dan Peterson
8887996718 temporary hotfix for live api resp handling 2021-12-23 20:59:08 -05:00