Commit graph

420 commits

Author SHA1 Message Date
jessopb
ea072febae
some fixes from odysee (#7423) 2022-01-19 15:12:54 -05:00
jessopb
064d8738dd
do not filter sharedPreferences from sdk prefs (#7418) 2022-01-17 20:08:40 -05:00
zeppi
e5c4a5a1d9 remove getTimestamp from collection new reducer 2022-01-10 08:41:34 -05:00
jessopb
22a302f528
mostly remove is_web (#7408) 2022-01-07 14:02:33 -05:00
jessopb
8a7b88f073
fix sync changes (#7407) 2022-01-07 13:03:29 -05:00
jessopb
78fb559fa2
small sync refactor cleaning up reducers (#7403) 2022-01-06 15:30:24 -05:00
jessopb
220021964d
clean sync_client_Settings reducer (#7402) 2022-01-06 15:30:08 -05:00
jessopb
7a100ec022
redux fixes (#7400) 2022-01-04 13:46:55 -05:00
jessopb
ba2caf4eb2
fix upload crash (#7399) 2022-01-04 10:13:15 -05:00
jessopb
a1f4a7f8ec
Electron 15 (#7384)
* upgrade electron to 15

* linter

* change electron-cookies to modded version for electron >=10

* electron-cookies version fix
2022-01-02 15:33:11 -05:00
jessopb
6d04ff6e32
Revert "upgrade electron to 15 (#7363)" (#7383)
This reverts commit 08c47a57f1.
2021-12-31 14:49:45 -05:00
jessopb
08c47a57f1
upgrade electron to 15 (#7363)
* upgrade electron to 15

* linter
2021-12-31 12:53:07 -05:00
jessopb
a3398843c2
Optimize selectClaimIsMine (#7370)
Frequently used; top in perf profile

Most of the time, you already have the claim object in the current context. `selectClaimIsMineForUri` will retrieve the claim again, which is wasteful, even if it is memoized (looking up the cache still takes time).

Break apart the logic and added the alternative `selectClaimIsMine` for faster lookup.

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2021-12-31 12:52:26 -05:00
jessopb
18619cac20
successfully repair default hubs when custom hub fails (#7366) 2021-12-20 16:20:16 -05:00
jessopb
4c17b3818e
quick fix for download connecting... (#7354) 2021-12-15 17:56:20 -05:00
jessopb
a0917908bb
add feature to enable experimental upgrades (#7353) 2021-12-15 15:58:47 -05:00
zeppi
408eb9a347 cleanup 2021-12-08 20:41:57 -05:00
zeppi
5e09de5f94 remove invites and rewards 2021-12-08 20:41:57 -05:00
jessopb
5be27a5e2c Revert "rm lbry.tv, rm lbryfirst, rm DOMAIN, etc"
This reverts commit 041127bbce.
2021-12-04 22:20:39 -05:00
zeppi
041127bbce rm lbry.tv, rm lbryfirst, rm DOMAIN, etc 2021-12-03 16:39:40 -05:00
infinite-persistence
0459148e30 Comment-selectors: fix memoization 2021-12-03 15:22:32 -05:00
infinite-persistence
4d01452447 Fix reaction-selector reference invalidation
When comments are refreshed, each `Comment` gets rendered 4-5 times due to reference invalidation for `othersReacts` (the data didn't actually change).

For selectors without transformation, there is no need to memoize using `createSelector` -- just access it directly. Also, don't do things like `return a[id] || {}` in a reducer, because the reference to the empty object will be different on each call.

Always return directly from the state so that the same reference is returned.

This simple change avoided the wasted resources needed for `createSelector`, and reduced to render to just 2 (initial render, and when reactions are fetched).
2021-12-03 15:22:32 -05:00
zeppi
e7572312a8 comment react selectors 2021-12-03 15:22:32 -05:00
infinite-persistence
29b845c3fc Optimize tags and followedTags
followedTags:
- Moved the filtering to the reducer side, so that we don't do it every time. We can't rely on `createSelector` because the store will be invalidated on each `USER_STATE_POPULATE`, unfortunately.

tags:
- Memoize via re-reselect for the "ForUri" selector.
2021-12-03 15:22:32 -05:00
infinite-persistence
26f89b3ec9 re-reselect proof of concept + fix Date selector as first example
`makeSelectDataForUri` always returns a new reference, so `ClaimPreview` was constantly being rendered. It's pretty expensive since `ClaimPreview`'s rendering checks against a huge blocklist, which is another issue on it's own.

- This commit tests the usage of `re-reselect` as the solution to the multi-instance memoization problem (https://github.com/toomuchdesign/re-reselect/blob/master/examples/1-join-selectors.md)
2021-12-03 15:22:32 -05:00
zeppi
d50a74327f improve sync 2021-11-30 15:03:38 -05:00
zeppi
eaf3826df8 update electron version to 11, some changes to app update 2021-11-27 10:18:56 -05:00
infinite-persistence
34feee3567 abandoningById fixes
- fix: was trying to extract keys from an array.
- `abandoningById` not cleared.
2021-11-16 16:23:17 -05:00
zeppi
b50779f1e5 custom share url 2021-10-21 22:58:33 -04:00
zeppi
ab9f70930d strip out livestreams 2021-10-20 17:05:37 -04:00
zeppi
3a77c7507b cut SIMPLE_SITE 2021-10-20 17:05:37 -04:00
zeppi
e17e355247 cleanup 2021-10-15 23:49:41 -04:00
zeppi
98df8b265f more flow 2021-10-15 23:49:41 -04:00
zeppi
6c3ed54d87 lint 2021-10-15 23:49:41 -04:00
zeppi
aa766dc8ee lint 2021-10-15 23:49:41 -04:00
zeppi
5088caef1e lint 2021-10-15 23:49:41 -04:00
zeppi
ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00
mayeaux
e3791aefdc
Send video bitrate and user bandwidth to Watchman (#7145)
* adding functionality to detect user download speed

* calculating bandwidth speed more intelligently

* saving download speed and updating it every 30s

* all the functionality should be done needs testing

* fix linting

* use a 1mb file for calculating bandwidth

* add optional chaining plugin to babel and get bitrate from texttrack

* allow optional chaining for flow

* ignore flow error

* disable bandwidth checking functionality

* fix flow error
2021-10-06 14:59:33 -04:00
zeppi
b44be39252 move file actions from lbry-redux 2021-10-06 10:22:49 -04:00
infinite-persistence
de6c6f9bfd
List own comments (#7171)
* Add option to pass in url-search params.

Impetus: allow linked comment ID and setting the discussion tab when clicking on the `ClaimPreview`.

* comment.list: fix typos and renamed variables

- Switch from 'author' to 'creator' to disambiguate between comment author and content author. For comment author, we'll use 'commenter' from now on.
- Corrected 'commenterClaimId' to 'creatorClaimId' (just a typo, no functional change).

* doCommentReset: change param from uri to claimId

This reduces one lookup as clients will always have the claimID ready, but might not have the full URI.

It was using URI previously just to match the other APIs.

* Add doCommentListOwn -- command to fetch own comments

Since the redux slice is set up based on content or channel ID (for Channel Discussion page), re-use the channel ID for the case of "own comments". We always clear each ID when fetching page-0, so no worries of conflict when actually browsing the Channel Discussion page.

* Comment: add option to hide the actions section

* Implement own-comments page

* Use new param to remove sort-pins-first.

comment.List currently always pushes pins to the top to support pagination. This new param removes this behavior.
2021-10-01 08:10:27 -04:00
infinite-persistence
c71b90cecf
Fix linked-comment scrolling
I think this the best solution so far, at the expense of a slight delay in scrolling if the network call stalls.

- Added "fetching by ID" state so that we don't need to use the ugly N-retries method.
- `scrollIntoView` doesn't work if the element is already in the viewport, and the `scrollBy` adjustment doesn't take into account the y-position restoration that we perform on certain type of pages. Use `window.scrollTo` instead and taking into account current scroll position.
2021-10-01 15:51:05 +08:00
infinite-persistence
2cebdc3113
Fix wrong 'recsysId' sent due to search-key mismatch
## Issue
.../archives/C02FQBM00Q0/p1633044695010600

## Changes
When querying a search key, it has to be an exact match. This was broken by the insertion of `free_only` in the fetch.

Added a function to generate the options, so that all clients stay in sync.
2021-10-01 10:46:26 +08:00
infinite-persistence
87636fc887
Commentron now includes replies for ByID request
Wasn't aware of that, and that was causing 7146 ("show replies" visible when there are no replies).
2021-09-30 09:22:21 +08:00
infinite-persistence
a8149fe9bb
Memoize 'mutedAndBlockedChannelIds'
It was being recalculated repeatedly.

This memoizes it, although it still re-calculates occasionally despite none of the source arrays changed. I think it is due to the state change in the Preference Sync.

Note: input selectors to `createSelector` needs to be extractions-only (i.e. must not have transformations). I think most of our `makeSelect*` selectors violate this and broke memoization.
2021-09-29 21:55:01 +08:00
saltrafael
ddc29ac853
Fix autoplay next default value (#7173) 2021-09-27 15:10:41 -04:00
saltrafael
cc76a4a665
Fix video embeds in comments not playing and resize issues (#7163) 2021-09-24 11:53:17 -04:00
infinite-persistence
3b47edc3b9
Livestream category improvements (#7115)
*  Remove old method of displaying active livestreams

Completely remove it for now to make the commit deltas clearer.
We'll replace it with the new method at the end.

* Fetch and store active-livestream info in redux

* Tiles can now query active-livestream state from redux instead of getting from parent.

*  ClaimTilesDiscover: revert and cleanup

## Simplify
- Simplify to just `uris` instead of having multiple arrays (`uris`, `modifiedUris`, `prevUris`)
- The `prevUris` is for CLS prevention. With this removal, the CLS issue is back, but we'll handle it differently later.
- Temporarily disable the view-count fetching. Code is left there so that I don't forget.

## Fix
- `shouldPerformSearch` was never true when `prefixUris` is present. Corrected the logic.
- Aside: prefix and pin is so similar in function. Hm ....

* ClaimTilesDiscover: factor out options

## Change
Move the `option` code outside and passed in as a pre-calculated prop.

## Reason
To skip rendering while waiting for `claim_search`, we need to add `React.memo(areEqual)`. However, the flag that determines if we are fetching `claim_search` (fetchingClaimSearchByQuery[]) depends on the derived options as the key.

Instead of calculating `options` twice, we moved it to the props so both sides can use it.

It also makes the component a bit more readable.

The downside is that the prop-passing might not be clear.

* ClaimTilesDiscover: reduce ~17 renders at startup to just 2.

* ClaimTilesDiscover: fill with placeholder while waiting for claim_search

## Issue
Livestream claims are fetched seperately, so they might already exists. While claim_search is running, the list only consists of livestreams (collapsed).

## Fix
Fill up the space with placeholders to prevent layout shift.

* Add 'useFetchViewCount' to handle fetching from lists

This effect also stashes fetched uris, so that we won't re-fetch the same uris during the same instance (e.g. during infinite scroll).

*  ClaimListDiscover: revert and cleanup

## Revert
- Removed the 'finalUris' stuff that was meant to "pause" visual changes when fetching. I think it'll be cleaner to use React.memo to achieve that.

## Alterations
- Added `renderUri` to make it clear which array that this component will render.
- Re-do the way we fetch view counts now that 'finalUris' is gone. Not the best method, but at least correct for now.

* ClaimListDiscover: add prefixUris, similar to ClaimTilesDiscover

This will be initially used to append livestreams at the top.

*  Re-enable active livestream tiles using the new method

* doFetchActiveLivestreams: add interval check

- Added a default minimum of 5 minutes between fetches. Clients can bypass this through `forceFetch` if needed.

* doFetchActiveLivestreams: add option check

We'll need to support different 'orderBy', so adding an "options check" when determining if we just made the same fetch.

* WildWest: limit livestream tiles + add ability to show more

Most likely this behavior will change in the future, so we'll leave `ClaimListDiscover` untouched and handle the logic at the page level.

This solution uses 2 `ClaimListDiscover` -- if the reduced livestream list is visible, it handles the header; else the normal list handles the header.

* Use better tile-count on larger screens.

Used the same method as how the homepage does it.
2021-09-24 10:26:21 -04:00
infinite-persistence
f38a15ee0d
Blocklist page: fix perpetual spinner when trying to refresh with no channels
There's nothing to do when you don't have a channel, so hide the button and ensure redux fails gracefully.
2021-09-24 15:04:59 +08:00
infinite-persistence
63fd867757
Fix moderator data misalignment. (#7139)
## Issue
Closes 7121 Missing mod block option (large number of moderated channels?)

## Notes
It was bad to assume `channelSignatures` would be the same length as the promise result -- any failure in signing would cause a misalignment.

For my case, an accidentally-merged channel couldn't be signed due to a missing private key. I think it's the same for Drew.
2021-09-21 10:40:44 -04:00
saltrafael
1c59913e7a
Recommended changes (#7089)
* Fix floating

* Change makeSelectRecommendedContentForUri behavior
2021-09-16 16:00:44 -04:00