subscription fixes
This commit is contained in:
parent
3830240084
commit
dc57671bd9
4 changed files with 10 additions and 8 deletions
|
@ -130,7 +130,7 @@
|
|||
"jsmediatags": "^3.8.1",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#a6bad61a9b03df9b48a380da544b61ec708a1281",
|
||||
"lbry-redux": "lbryio/lbry-redux#a2ef019c694e7d3c415336b1362779e37f2dc8e4",
|
||||
"lbryinc": "lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
|
|
|
@ -51,7 +51,7 @@ function FollowingPage(props: Props) {
|
|||
onClick={() => onClick()}
|
||||
/>
|
||||
}
|
||||
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => sub.uri) : channelUris}
|
||||
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
makeSelectChannelForClaimUri,
|
||||
selectClaimsByUri,
|
||||
parseURI,
|
||||
makeSelectClaimForUri,
|
||||
} from 'lbry-redux';
|
||||
import { swapKeyAndValue } from 'util/swap-json';
|
||||
|
||||
|
@ -260,7 +261,8 @@ export const makeSelectIsSubscribed = uri =>
|
|||
createSelector(
|
||||
selectSubscriptions,
|
||||
makeSelectChannelForClaimUri(uri, true),
|
||||
(subscriptions, channelUri) => {
|
||||
makeSelectClaimForUri(uri),
|
||||
(subscriptions, channelUri, claim) => {
|
||||
if (channelUri) {
|
||||
return subscriptions.some(sub => sub.uri === channelUri);
|
||||
}
|
||||
|
@ -271,9 +273,9 @@ export const makeSelectIsSubscribed = uri =>
|
|||
({ isChannel } = parseURI(uri));
|
||||
} catch (e) {}
|
||||
|
||||
if (isChannel) {
|
||||
const uriWithPrefix = uri.startsWith('lbry://') ? uri : `lbry://${uri}`;
|
||||
return subscriptions.some(sub => sub.uri === uriWithPrefix);
|
||||
if (isChannel && claim) {
|
||||
const uri = claim.permanent_url;
|
||||
return subscriptions.some(sub => sub.uri === uri);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -7179,9 +7179,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
|
|||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#a6bad61a9b03df9b48a380da544b61ec708a1281:
|
||||
lbry-redux@lbryio/lbry-redux#a2ef019c694e7d3c415336b1362779e37f2dc8e4:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/a6bad61a9b03df9b48a380da544b61ec708a1281"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/a2ef019c694e7d3c415336b1362779e37f2dc8e4"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
|
Loading…
Add table
Reference in a new issue