Commit graph

4539 commits

Author SHA1 Message Date
jessopb
ba2caf4eb2
fix upload crash (#7399) 2022-01-04 10:13:15 -05:00
jessopb
cedfd3e32c
fix comments (#7398) 2022-01-04 10:01:01 -05:00
jessopb
e704f87557
fix publish confirmation field (#7397) 2022-01-04 09:36:44 -05:00
jessopb
0eab08e3b4
remove loadingBar, fix parser dependency (#7394) 2022-01-03 10:27:55 -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
500ed82988
restore medium spacing on cards (#7382) 2021-12-31 10:56:25 -05:00
jessopb
fd8cf9b40d
clean up related card title header spacing (#7381) 2021-12-30 22:54:45 -05:00
jessopb
dbc980cab5
clear shuffle when entering edit or publish for collections (#7380) 2021-12-30 22:21:37 -05:00
jessopb
b2e2e84cc0
show channel analytics only if authed (#7378) 2021-12-30 15:54:00 -05:00
jessopb
dfdd3fc248
more whitespace on cards (#7377) 2021-12-30 15:51:28 -05:00
jessopb
2549f5b0ad
fix library filter crash (#7376) 2021-12-30 15:35:35 -05:00
Daniela Narvaez
0600646479
update input border color in light theme #5551 (#7373) 2021-12-30 13:48:26 -05:00
jessopb
36890601a8
no empty lists on lists page (#7375) 2021-12-30 13:36:08 -05:00
jessopb
59a188044e
fix private lists editing (#7374) 2021-12-30 13:10:10 -05:00
jessopb
ca15faef02
fix advanced editor in description (#7372) 2021-12-29 15:58:55 -05:00
jessopb
cb7f2e87cf
use parser (#7369) 2021-12-24 13:08:47 -05:00
jessopb
44fd8349a7
fix comment replies (#7367) 2021-12-23 11:31:20 -05:00
jessopb
18619cac20
successfully repair default hubs when custom hub fails (#7366) 2021-12-20 16:20:16 -05:00
jessopb
1929089fab
fix advanced text area (#7360) 2021-12-16 15:03:53 -05:00
jessopb
ae682a4a33
restore posts publishing (#7359) 2021-12-16 14:26:52 -05:00
jessopb
5e3844390f
update disk space setting to new api (#7356) 2021-12-15 18:11:22 -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
infinite-persistence
05d5e6c05d
Remove old mobile chromecast css hack (#7352)
lbry-desktop--6844

This negates 49abbecb.

Now that we have a dedicated chromecast button, we don't need to hack Chrome's default cast button to appear on top of vjs-mobile-ui.  The hack no longer works anyway, since the CSS exposure has been deprecated around mid 2020 -- it is still available, but its abilities has become less and less.
2021-12-14 21:09:24 -05:00
jessopb
514bc0a273
remove referral code from share (#7350)
* remove referral code from share

* cleanup
2021-12-13 09:02:28 -05:00
jessopb
0cd1c6d535
improve repost modal styling (#7345) 2021-12-12 18:14:07 -05:00
Bradley Ray
e5072c8681
Modal repost (#7341)
* make repost into a modal

* remove unecessary import

* removed page/repost

* fixed yarn lint errors

* added page/repost back

* added "Repost" title bar

* fixed yarn lint errors
2021-12-12 01:03:00 -05:00
jessopb
13a9f5035d
Fixes the play/pause on drag issue with the floating player. (#221) (#7339)
I tried to use event.preventDefault on the click handler but that didn't
work. So instead I'm using css 'pointer-events: none' to disable click
events on the player while the player is being dragged.

https://github.com/OdyseeTeam/odysee-frontend/issues/206

Co-authored-by: maxime peabody <maximepeabody@gmail.com>
2021-12-10 13:08:15 -05:00
Bohdan Kornatskyi
3458fa5e50
Fix MenuButton behavior from toggle dropdown onMousePress to onClick (#7335)
* changed behavior of a MenuButton. now it shows drop down on click not on mouse down

* fix 'Enter' key handling

* changed behavior of a MenuButton. now it shows drop down on click not on mouse down

* fix 'Enter' key handling
2021-12-09 18:05:37 -05:00
zeppi
ec14cc8828 update deps 2021-12-08 21:18:45 -05:00
zeppi
408eb9a347 cleanup 2021-12-08 20:41:57 -05:00
zeppi
6ba1fafaa0 remove extra sign up pages 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
d89ef5b928 fix scroll bars 2021-12-03 17:07:09 -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
b778c70837 ORDER typo 2021-12-02 21:19:42 -05:00
zeppi
60f2fd65fd remove copy 2021-12-02 21:13:47 -05:00
zeppi
0c1b681b44 cleaner discover filters display 2021-12-02 20:43:32 -05:00
zeppi
5fed2d01c0 list editing behind toggle button 2021-12-02 20:43:19 -05:00
zeppi
f79446b1e7 update trending to use trending_score 2021-12-02 20:42:51 -05:00
zeppi
cfd876927f list publish page listview type 2021-12-02 15:08:24 -05:00
zeppi
fea6ca8635 clean 2021-12-02 15:08:24 -05:00
zeppi
f1de3b193e collection reordering changes 2021-12-02 15:08:24 -05:00
infinite-persistence
02ba41e759 File description (collapsed): show ~3 lines instead of ~1
## Ticket
- Closes https://github.com/lbryio/lbry-desktop/issues/7222
- Also felt it's too squished for the longest time. Previously fixed comments but didn't handle this.
2021-12-01 13:47:14 -05:00
zeppi
d50a74327f improve sync 2021-11-30 15:03:38 -05:00
infinite-persistence
7afe2c58b0 Debounce volume and muted state update.
## Ticket
"Overall React Lag or Extra Re-renders / Volume slider laggy since v0.48"

## The problem
Every redux update results in each mounted component's prop mapping function (the `select` and `perform` stuff) to be recalculated. This is normal per redux, but we do lots of heavy stuff there.

The slider was sending tons of redux update for the Volume and Muted setting.

## Changes
The redux volume/muted setting is just used to restore vjs to the user's setting on the next video, so it doesn't need to be updated immediately/constantly -- vjs keeps it's own video settings.  Debounced that action.
2021-11-29 16:19:38 -05:00
infinite-persistence
30b1562e64 Syntax correction 2021-11-29 16:19:08 -05:00
zeppi
1360e21016 fixes restoring wallet page and removing lbry.tv references 2021-11-28 15:06:11 -05:00
infinite-persistence
c6322ddb24 Floating player position-listener fixes (#289)
- 251 Dragging the floating player is super laggy

Recent changes and/or refactoring combined the effects or added dependancies into the effects, causing them to re-run excessively.

- Restored effects to their original behavior.
- Don't perform the position check when dragging -- only do it when released.
- Do proper debouncing for the 'resize' listener -- the previous method was incorrect as a new function is created on each render.
2021-11-28 12:12:12 -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
infinite-persistence
cb97e94c4d Fix missing state 2021-11-16 16:23:17 -05:00
zeppi
eb56f1b486 carry collection active tab to playlists page 2021-11-07 14:59:35 -05:00
zeppi
41edd8317c update pagination if page param changes 2021-11-07 14:59:35 -05:00
zeppi
32988bb7ca fix pagination, reset page on filter button 2021-11-07 14:59:35 -05:00
zeppi
5df736dc6b limit collection display
make it clear lists page is truncated

lists display page

cleanup
2021-11-07 14:59:35 -05:00
zeppi
7a2adae09c restore file release time 2021-10-29 12:24:33 -04:00
zeppi
4c8920339d improve channel cover upload ux 2021-10-28 15:17:18 -04:00
zeppi
d15423dc65 do not block submit on thumb or cover error 2021-10-28 15:17:18 -04:00
zeppi
6718528847 copy 2021-10-27 21:46:47 -04:00
zeppi
772bf6fcca disk space setting 2021-10-27 21:46:47 -04:00
zeppi
82895bbce8 improve channel parsing for mentions maybe 2021-10-27 21:46:00 -04:00
zeppi
0ba3d78b27 cloud connect 2021-10-22 16:39:45 -04:00
zeppi
7d5d7d3c55 remove web and embed 2021-10-22 11:20:22 -04:00
zeppi
b50779f1e5 custom share url 2021-10-21 22:58:33 -04:00
zeppi
3784ec9e21 remove lbryinc web, update sitename, etc 2021-10-21 21:20:59 -04:00
zeppi
e55cae9496 fix top on search page 2021-10-20 17:05:37 -04:00
zeppi
d20e4ad0e7 remove more web folder stuff 2021-10-20 17:05:37 -04:00
zeppi
c66cfb28b5 tip modal no fiat 2021-10-20 17:05:37 -04:00
zeppi
73214a94ec export all 2021-10-20 17:05:37 -04:00
zeppi
b6bb5f05ec credits only on tx page 2021-10-20 17:05:37 -04:00
zeppi
ab9f70930d strip out livestreams 2021-10-20 17:05:37 -04:00
zeppi
fca18c26d3 remove lazy import 2021-10-20 17:05:37 -04:00
zeppi
3a77c7507b cut SIMPLE_SITE 2021-10-20 17:05:37 -04:00
zeppi
2d008899b6 clean up file page and reactions 2021-10-16 16:42:29 -04:00
zeppi
390bb6dfa6 fix repost list empty 2021-10-16 14:12:59 -04:00
zeppi
9306971620 fixes around follow discover page, ads .env and dev mode titlebar 2021-10-16 14:12:59 -04:00
zeppi
d405ff5ffb nudge 2021-10-15 23:49:41 -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
11a4524c4c lint 2021-10-15 23:49:41 -04:00
zeppi
6c3ed54d87 lint 2021-10-15 23:49:41 -04:00
zeppi
1981f16715 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
infinite-persistence
2c3c0e8f1d
Fix 'setting.Get' runaway calls
## Issue
60 setting.Get calls spiked since October

It was called 24 times per livestream page load.

## Notes
The effect was intended to be a one-time effect, but the dependency was changed in 2f4dedfb
2021-10-15 14:01:05 +08:00
Bradley Ray
4aaa26794b added semicolon to import statement 2021-10-12 12:49:49 -04:00
Bradley Ray
3d7470b01d change to import instead of redefining const 2021-10-12 12:49:49 -04:00
Bradley Ray
ffb3f1ac35 fixed disable-support for comments 2021-10-12 12:49:49 -04:00
infinite-persistence
8d399d6a2c
Revert accidental commit from ody repo
"[Comments] Batch resolve #7236"

This reverts commit b8cc60697b, reversing
changes made to e3791aefdc.
2021-10-11 09:43:58 +08:00
saltrafael
620de2e6b7
Batch resolve replies 2021-10-11 08:35:50 +08:00
saltrafael
cafefb2a33
Refactor commentsReplies 2021-10-11 08:35:50 +08:00
saltrafael
f7cb39c496
Batch resolve comment list channels 2021-10-11 08:35:49 +08:00
infinite-persistence
9d48d9924d
Comments: expand replies for LC chain before mount instead of after
## Issue
40 Linked comments doesn't scroll for deep replies

## Notes
Don't need an effect for this, plus it was causing the parent to not pick it up for auto-scrolling.
2021-10-09 15:38:38 +08:00
Thomas Zarebczan
fc657d98d2
Sync language 2021-10-08 16:21:50 -04:00
Thomas Zarebczan
eaa32e4df4
Odysee references revamp, part1 2021-10-08 15:22:07 -04:00
infinite-persistence
b455e807bc
Disable timestamp parsing in livestream chat
## Issues
- The current version of the link handler doesn't seem able to control the livestream player's position.
- The "live" position is always 0:00 and everything behind it is a negative timestamp. The current timestamp parser doesn't handle negative values.
2021-10-08 17:59:05 +08:00
Thomas Zarebczan
88794761d0
use thumbnails.odysee.com
f
2021-10-07 16:38:59 -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
jessopb
4bc4a965d9
fix notifications page on unauthed app (#7226) 2021-10-06 10:13:37 -04:00
infinite-persistence
0be3154cbe
Fix playlist strings 2021-10-06 08:39:05 +08:00
Branko Tomic
a04c69f787 Prevent comment content from breaking the layout on mobile 2021-10-05 09:55:14 +08:00
saltrafael
256ed6a106
Remove expand/collapse from channel discussion page 2021-10-05 09:19:56 +08:00
saltrafael
fc2e08c882
Refactor commentsList 2021-10-05 09:19:56 +08:00
Dan Peterson
905a52ea61
adjust css for toast message so that it behaves as expected (text truncation via ellipsis) (#7213) 2021-10-04 09:21:59 -04:00
saltrafael
d6e14b84db
Add copy comment link menu option (#7224) 2021-10-04 09:20:37 -04:00
saltrafael
2ba6023926
Fix spacing / centering live stream + comments section (#7225) 2021-10-04 09:19:52 -04:00
zeppi
f7b942fa42 patch hubs claims_in_channel temporarily 2021-10-02 14:01:22 -04:00
zeppi
d54976e461 patch creator analytics with hub without channel claim count 2021-10-02 13:29:46 -04:00
Thomas Zarebczan
aa0db24d0d
Temp workaround claims in channel count 0 2021-10-02 11:48:45 -04:00
Thomas Zarebczan
1cb0461991
Temp workaround SDK 0 count 2021-10-02 11:44:25 -04:00
infinite-persistence
11c9a53872
Fix 'pinnedUrl' error.
Part of "6989 Fix console spam in dev"

EXTRA_SIDEBAR_LINKS should be a `SideNavLink` object, so trim down the return object from `GetLinksData`.
2021-10-02 15:08:19 +08:00
jessopb
4c72a563da
Update icons.js 2021-10-01 13:41:00 -04:00
saltrafael
56817d4e69
Fix resolving invalid claims (#7210) 2021-10-01 12:00:57 -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
dd7c56a324
i18n - ChannelMention and other fixes 2021-10-01 08:12:37 +08:00
saltrafael
2f4dedfba2
Add Channel Mention selection ability (#7151)
* Add Channel Mention selection ability

* Fix mentioned user name being smaller than other text

* Improve logic for locating a mention

* Fix mentioning with enter on livestream

* Fix breaking for invalid URI query

* Handle punctuation after mention

* Fix name display and appeareance

* Use canonical url

* Fix missing search
2021-09-30 17:30:32 -04:00
saltrafael
81abae875f
Fix plant icon (#7195)
* Fix plant icon

* Also change phone icon name
2021-09-30 14:05:39 -04:00
Bradley Ray
819bdea0c6
fix playlist resolving collectionurls (#7178)
* fix playlist resolving collectionurls

* Update CHANGELOG.md

Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
2021-09-30 09:03:50 -04:00
saltrafael
26f80b0ec5
Add icons (#7194) 2021-09-30 09:01:24 -04:00
infinite-persistence
0984fe8370
Fix page titles for SiteLinks
Part of `7166 improve search metadata`, where page titles are important clues for Google to generate Site-Links.
2021-09-30 14:47:18 +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
jessopb
fdd2d503d9
use homepage LATEST for following discover (#7185) 2021-09-29 15:22:46 -04:00
mayeaux
25b56ada48
Fix issue where channel upload viewcounts were creating a new line (#7154)
* fix issue where viewcounts were creating a new line

* conditionally add large view css

* conditionally apply class based on if view count should be shown

* last couple touchups

* clean up the css

* add scss to flow config

* add scss component to flow config
2021-09-29 15:04:43 -04:00
Branko Tomic
b1d4f119a7
Fix “Your Account” popup on mobile (#5652) (#7172)
* Fix “Your Account” popup on mobile (#5652)

* Update changelog

Co-authored-by: Branko Tomic <branko@spicefactory.co>
2021-09-29 11:20:36 -04: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
infinite-persistence
b796ab3207
Fix missed render when blocklist is fetched
## Issue
7176

## Changes
Pitfalls of pausing render via React.memo:
  - We'll miss the `doClaimSearch()` since that is sparked by an `useEffect`.

Seems like we can't avoid having a redundant copy of the previously-displayed URIs.
2021-09-29 16:33:18 +08:00
saltrafael
ddc29ac853
Fix autoplay next default value (#7173) 2021-09-27 15:10:41 -04:00
infinite-persistence
78d0ff9793
Adjust comment fade-out height
## Issue
6944 Comment expansion sometimes doesn't reveal extra text (already showing everything)

## Fix
Reconcile some constants between JS and CSS.
2021-09-27 11:01:44 +08:00
infinite-persistence
3c0750a2a0
Fix homepage tiles not filtering blocked channels
## Ticket
7165 homepage queries don't take into account blocked channel ids (mute does)

## Changes
resolveSearchOptions: was not grabbing redux data correctly.
2021-09-25 13:14:08 +08: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
0e391a3d78
Comment: Swap the order of "Edit" and "Remove"
This order is more common.
2021-09-24 10:00:37 +08:00
infinite-persistence
65d7e478ac
Don't allow assigning yourself as moderator
Also fixed split-string (hard to localize).
2021-09-24 09:57:24 +08:00
infinite-persistence
6658217865
Restore "Stream Key Button (#7127)" + lint and modifications
- Consolidate functionality into existing component.
- Use proper strings.
2021-09-23 20:13:02 +08:00
infinite-persistence
8bc8c4bcae
Revert "Stream Key Button (#7127)"
I forgot to lint before merging. Reverting for now, will fix in a bit.

This reverts commit 5c8878353f.
2021-09-23 17:57:49 +08:00