Do not count auto follow channels for UserChannelFollowIntro.

This commit is contained in:
Franco Montenegro 2021-08-10 23:35:25 -03:00 committed by Thomas Zarebczan
parent c0fbc412ae
commit 3f162eb285

View file

@ -28,6 +28,9 @@ function UserChannelFollowIntro(props: Props) {
channelIds = PRIMARY_CONTENT.channelIds;
}
const followingCount = (subscribedChannels && subscribedChannels.length) || 0;
const followingCountIgnoringAutoFollows = (subscribedChannels || []).filter(
(channel) => !channelsToSubscribe.includes(channel.uri)
).length;
// subscribe to lbry
useEffect(() => {
@ -74,9 +77,13 @@ function UserChannelFollowIntro(props: Props) {
<Nag
type="helpful"
message={
followingCount === 1
? __('Nice! You are currently following %followingCount% creator', { followingCount })
: __('Nice! You are currently following %followingCount% creators', { followingCount })
followingCountIgnoringAutoFollows === 1
? __('Nice! You are currently following %followingCount% creator', {
followingCount: followingCountIgnoringAutoFollows,
})
: __('Nice! You are currently following %followingCount% creators', {
followingCount: followingCountIgnoringAutoFollows,
})
}
actionText={__('Continue')}
onClick={onContinue}