PageShow: fix isSubscribed always false

- Using `selectIsSubscribedForUri` instead, because the given uri is in Canon while the subscription list is in Permanent, so the result was always `false`.
This commit is contained in:
infinite-persistence 2021-12-10 13:58:00 +08:00
parent 70a339c5d4
commit 316ce220bf
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -23,7 +23,7 @@ import { doFetchItemsInCollection } from 'redux/actions/collections';
import { normalizeURI } from 'util/lbryURI';
import * as COLLECTIONS_CONSTS from 'constants/collections';
import { push } from 'connected-react-router';
import { makeSelectChannelInSubscriptions } from 'redux/selectors/subscriptions';
import { selectIsSubscribedForUri } from 'redux/selectors/subscriptions';
import { selectBlacklistedOutpointMap } from 'lbryinc';
import ShowPage from './view';
@ -75,7 +75,7 @@ const select = (state, props) => {
isResolvingUri: selectIsUriResolving(state, uri),
blackListedOutpointMap: selectBlacklistedOutpointMap(state),
totalPages: makeSelectTotalPagesForChannel(uri, PAGE_SIZE)(state),
isSubscribed: makeSelectChannelInSubscriptions(uri)(state),
isSubscribed: selectIsSubscribedForUri(state, uri),
title: selectTitleForUri(state, uri),
claimIsMine: selectClaimIsMine(state, claim),
claimIsPending: makeSelectClaimIsPending(uri)(state),