Commit graph

27 commits

Author SHA1 Message Date
infinite-persistence
0941667150
Cost Info selector fixes
- no memo required since they are just directly accessing the store.
2021-11-19 16:01:25 +08:00
infinite-persistence
0f68bad3eb
Optimize selectClaimIsMine
## Why
Frequently used; top in perf profile

## Changes
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.
2021-11-11 16:10:06 +08:00
infinite-persistence
ece2312ec5 selectClaimIsMineForUri to replace makeSelectClaimIsMine
## Issue
`normalizeUri` | `parseURI` is expensive and has been causing sluggish operations when called repeatedly or within a loop.

## Change
Since I'm not confident enough to remove the call entirely from makeSelectClaimIsMine (although I've yet to find a scenario that the uri is not already normalized), we'll try caching the calls instead.

## Results
- in a simple test of toggling between 2 category pages, we saved 20ms from `parseURI` calls alone.

- in a test of opening all categories one time, the memory usage remained similar. This makes sense since we removed a `makeSelect*` (which creates a selector for each call + not memoizing), and replaced that with a cached selector that's actually memoizing.
2021-11-10 16:49:12 +08:00
Merge
30023422b8
Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
btzr-io
7c8c43d3a7 fix file actions accessibility 2021-07-15 15:14:21 -05:00
infinite-persistence
fbcb740dc9 Move 'Download' and 'Report Content' into overflow menu.
## Issue
6236 Add context menu to file page

## Notes
The download button actually handles a lot of things -- generating 'streamingUrl', differences between Web and Desktop, download progress for Desktop, etc.  A simpler fix would be to put something else (maybe "Share") into the overflow menu instead.

Anyway, went ahead to do it per 6236, but retained the item for Desktop since we need a progress label.
2021-06-18 15:50:13 -04:00
infinite-persistence
217ae3ecf7 Fix broken 'Open File' icon color
## Issue
The removal of `svg` from `media__subtitle` in 09b689ba made the icon black.

## Fix
Both 'Open File' and 'Download' should have the same css class.
2021-02-24 11:23:06 -05:00
Sean Yesmunt
0cc3af28a3 flow fixes 2020-12-16 10:52:22 -05:00
Sean Yesmunt
138d84155b fix opening files externally on desktop 2020-12-15 13:58:27 -05:00
Sean Yesmunt
a92a3305b1 align FileActions with odysee style 2020-09-30 17:00:18 -04:00
Sean Yesmunt
1dcf16b0b4 fix download link on desktop 2020-06-08 16:26:49 -04:00
infiinte-persistence
1ef182ed71 Fix split sentence: "% downloaded"
#4239
2020-05-28 09:50:08 -04:00
Sean Yesmunt
c2abcf110c
Paid content on lbry.tv (#4197) 2020-05-21 11:38:28 -04:00
Jeremy Kauffman
872259b73a
File downloads and refactoring (#3918)
* am I done?

* post diff

* unused selector cleanup

* missed commit

* mess with button styles

* fix flow

Co-authored-by: Jeremy Kauffman <jeremy@lbry.io>
Co-authored-by: Sean Yesmunt <sean@lbry.io>
2020-04-01 14:43:50 -04:00
Kenneth Tubman V
b2bf80f3ce Added download icon to Claim Previews 2020-02-05 12:03:54 -05:00
jessop
71c1a8821a reenable downloads 2020-02-01 16:17:20 -05:00
Sean Yesmunt
4bb4d66852 make sure claim exists before showing download link 2020-01-30 11:48:14 -05:00
Sean Yesmunt
10d12fb0e8 cleanup 2020-01-29 14:04:08 -05:00
Sean Yesmunt
5944e471c7 use local download url that redirects to api server 2020-01-13 12:42:24 -05:00
Sean Yesmunt
b50f1b0d8b trigger analytics view for download on lbry.tv 2020-01-13 12:42:24 -05:00
Sean Yesmunt
978871a927 enable downloads on lbry.tv 2020-01-13 12:42:24 -05:00
Sean Yesmunt
15815e5071 remove [data-mode='dark'] 2019-11-22 16:45:33 -05:00
Sean Yesmunt
73bd46e7d8 fire analytics event after file has started downloading 2019-11-13 10:43:21 -05:00
jessop
1427ad2a76 triggers analytic before completed for downloads 2019-11-13 10:43:21 -05:00
jessop
ba4d6afde0 triggers analytic on download click + completed 2019-11-13 10:43:21 -05:00
jessop
723d1fabbb adds anaytics to download button 2019-11-13 10:43:21 -05:00
Sean Yesmunt
6ad31a3ce9 refactor lbrytv web server 2019-11-11 13:27:29 -05:00