FileViewCountInline: fix incorrect logic
4a22814c
broke the intention of if-block (it essentially breaks the functionality in Search page if we enable view counts there in the future).
It also seems completely unrelated to the PR.
This commit is contained in:
parent
1a5fb5fa51
commit
f8f9b86cb4
1 changed files with 1 additions and 9 deletions
|
@ -30,9 +30,6 @@ export default function FileViewCountInline(props: Props) {
|
|||
// clean up (only one place edit/remove).
|
||||
const isChannelPage = window.location.pathname.startsWith('/@');
|
||||
|
||||
// Checks if search page and gives a bullet between claim name and ago.
|
||||
const isSearchPage = window.location.pathname.startsWith('/$/search');
|
||||
|
||||
// dont show if no view count, if it's a repost, a livestream or isn't a channel page
|
||||
if (!viewCount || (claim && claim.repost_url) || isLivestream || !isChannelPage) {
|
||||
// (1) Currently, makeSelectViewCountForUri doesn't differentiate between
|
||||
|
@ -40,12 +37,7 @@ export default function FileViewCountInline(props: Props) {
|
|||
// ideal to highlight that a view has 0 count, let's just not show anything.
|
||||
// (2) No idea how to get the repost source's claim ID from the repost claim,
|
||||
// so hiding it for now.
|
||||
if (isSearchPage) {
|
||||
return <> • </>;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue