Top Search: handle view count for Repost (#736)

## Issue
Closes "87 Repost - Top result should show followers properly"

The winning url for "bret" search is "lbry://bret", which is a repost.

## Change
We need to use the canon url to retrieved the fetched view count.
This commit is contained in:
infinite-persistence 2022-01-19 06:04:01 -08:00 committed by GitHub
parent 3338f9142c
commit 18c7469d25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ const select = (state, props) => {
claim,
pending: makeSelectClaimIsPending(props.uri)(state),
isLivestream,
subCount: isChannel ? selectSubCountForUri(state, props.uri) : 0,
subCount: isChannel ? selectSubCountForUri(state, claim.repost_url ? claim.canonical_url : props.uri) : 0,
};
};