From 0cdd7b3a0c2876e2b793f0faf158258913c466c5 Mon Sep 17 00:00:00 2001 From: feruz Date: Sun, 29 Mar 2026 11:21:18 +0300 Subject: [PATCH 1/4] My Waves, your waves --- src/components/comment/view/commentView.tsx | 5 +- .../comments/container/commentsContainer.tsx | 2 + src/components/comments/view/commentsView.tsx | 2 + .../queries/postQueries/wavesQueries.ts | 4 +- src/screens/waves/children/wavesHeader.tsx | 27 ++++++-- src/screens/waves/screen/wavesScreen.tsx | 64 +++++++++++++++++-- 6 files changed, 90 insertions(+), 14 deletions(-) diff --git a/src/components/comment/view/commentView.tsx b/src/components/comment/view/commentView.tsx index 7720bdb4d9..33dc02ceed 100644 --- a/src/components/comment/view/commentView.tsx +++ b/src/components/comment/view/commentView.tsx @@ -51,6 +51,7 @@ const CommentView = ({ onUpvotePress, handleParaSelection, onTagPress, + onAuthorPress, }) => { const intl = useIntl(); @@ -314,8 +315,8 @@ const CommentView = ({ customStyle={{ alignItems: 'flex-start', paddingLeft: 12 }} showDotMenuButton={true} handleOnDotPress={() => handleOnMenuPress(comment)} - avatarOnPress={handleOnUserPress} - profileOnPress={_openProfilePage} + avatarOnPress={onAuthorPress || handleOnUserPress} + profileOnPress={onAuthorPress || _openProfilePage} secondaryContentComponent={_renderComment()} /> diff --git a/src/components/comments/container/commentsContainer.tsx b/src/components/comments/container/commentsContainer.tsx index 866810cb35..2b6a487675 100644 --- a/src/components/comments/container/commentsContainer.tsx +++ b/src/components/comments/container/commentsContainer.tsx @@ -55,6 +55,7 @@ const CommentsContainer = ({ postType, handleCommentDelete, onTagPress, + onAuthorPress, }) => { const navigation = useNavigation(); const postsCachePrimer = postQueries.usePostsCachePrimer(); @@ -321,6 +322,7 @@ const CommentsContainer = ({ isLoading={isLoading} postType={postType} onTagPress={onTagPress} + onAuthorPress={onAuthorPress} /> ); }; diff --git a/src/components/comments/view/commentsView.tsx b/src/components/comments/view/commentsView.tsx index 84e000c605..4b16ffb3f5 100644 --- a/src/components/comments/view/commentsView.tsx +++ b/src/components/comments/view/commentsView.tsx @@ -44,6 +44,7 @@ const CommentsView = ({ isLoading, postType, onTagPress, + onAuthorPress, }) => { const [selectedComment, setSelectedComment] = useState(null); const intl = useIntl(); @@ -142,6 +143,7 @@ const CommentsView = ({ fetchedAt={fetchedAt} incrementRepliesCount={incrementRepliesCount} onTagPress={onTagPress} + onAuthorPress={onAuthorPress} /> ); }; diff --git a/src/providers/queries/postQueries/wavesQueries.ts b/src/providers/queries/postQueries/wavesQueries.ts index 0808f3a906..6c57341aa2 100644 --- a/src/providers/queries/postQueries/wavesQueries.ts +++ b/src/providers/queries/postQueries/wavesQueries.ts @@ -16,6 +16,7 @@ import { getWavesByHostQueryOptions, getWavesFollowingQueryOptions, getWavesByTagQueryOptions, + getWavesByAccountQueryOptions, useDeleteComment, WaveEntry, } from '@ecency/sdk'; @@ -30,7 +31,8 @@ import { useAuthContext } from '../../sdk'; type WavesQueryOptions = | ReturnType | ReturnType - | ReturnType; + | ReturnType + | ReturnType; export const useWavesQuery = (sdkQueryOptions: WavesQueryOptions, host: string) => { const queryClient = useQueryClient(); diff --git a/src/screens/waves/children/wavesHeader.tsx b/src/screens/waves/children/wavesHeader.tsx index 52269f703a..3188e6dda8 100644 --- a/src/screens/waves/children/wavesHeader.tsx +++ b/src/screens/waves/children/wavesHeader.tsx @@ -7,20 +7,35 @@ export type WavesFeedType = 'for-you' | 'following'; interface WavesHeaderProps { activeTag: string | null; + activeAuthor: string | null; onClearTag: () => void; + onClearAuthor: () => void; } -export const WavesHeader = ({ activeTag, onClearTag }: WavesHeaderProps) => { - if (!activeTag) { +export const WavesHeader = ({ + activeTag, + activeAuthor, + onClearTag, + onClearAuthor, +}: WavesHeaderProps) => { + if (!activeTag && !activeAuthor) { return null; } return ( - - #{activeTag} - - + {!!activeTag && ( + + #{activeTag} + + + )} + {!!activeAuthor && ( + + @{activeAuthor} + + + )} ); }; diff --git a/src/screens/waves/screen/wavesScreen.tsx b/src/screens/waves/screen/wavesScreen.tsx index 0586d6d58a..3f24fdc3d4 100644 --- a/src/screens/waves/screen/wavesScreen.tsx +++ b/src/screens/waves/screen/wavesScreen.tsx @@ -17,6 +17,7 @@ import { getWavesByHostQueryOptions, getWavesFollowingQueryOptions, getWavesByTagQueryOptions, + getWavesByAccountQueryOptions, } from '@ecency/sdk'; import { Comments, @@ -49,6 +50,7 @@ const WavesFeed = ({ queryKey, listRef, onTagPress, + onAuthorPress, onOptionsPress, onScrollStateChange, onVisibilityChange, @@ -58,6 +60,7 @@ const WavesFeed = ({ queryKey: string; listRef: React.RefObject; onTagPress: (tag: string) => void; + onAuthorPress: (username: string) => void; onOptionsPress: (content: any) => void; onScrollStateChange: (state: { enabled: boolean; offset: number }) => void; onVisibilityChange?: (api: { @@ -136,6 +139,7 @@ const WavesFeed = ({ handleOnOptionsPress={onOptionsPress} handleCommentDelete={wavesQuery.deleteWave} onTagPress={onTagPress} + onAuthorPress={onAuthorPress} flatListProps={{ ref: listRef, onEndReached: _fetchData, @@ -162,9 +166,11 @@ const WavesScreen = () => { const forYouListRef = useRef(null); const followingListRef = useRef(null); const tagListRef = useRef(null); + const authorListRef = useRef(null); const [feedType, setFeedType] = useState('for-you'); const [activeTag, setActiveTag] = useState(null); + const [activeAuthor, setActiveAuthor] = useState(null); const [enableScrollTop, setEnableScrollTop] = useState(false); const [lazyLoad, setLazyLoad] = useState(false); const activeDeleteWaveRef = useRef< @@ -186,8 +192,14 @@ const WavesScreen = () => { () => (activeTag ? getWavesByTagQueryOptions(WAVES_HOST, activeTag) : null), [activeTag], ); + const authorQueryOptions = useMemo( + () => (activeAuthor ? getWavesByAccountQueryOptions(WAVES_HOST, activeAuthor) : null), + [activeAuthor], + ); - const activeListRef = activeTag + const activeListRef = activeAuthor + ? authorListRef + : activeTag ? tagListRef : feedType === 'following' ? followingListRef @@ -248,6 +260,18 @@ const WavesScreen = () => { setActiveTag(null); }, []); + const _handleAuthorFilter = useCallback((username: string) => { + setFeedType((prev) => (prev === 'following' ? 'for-you' : prev)); + setEnableScrollTop(false); + setActiveTag(null); + setActiveAuthor(username); + }, []); + + const _handleClearAuthor = useCallback(() => { + setEnableScrollTop(false); + setActiveAuthor(null); + }, []); + const _handleOnOptionsPress = (content: any) => { if (postOptionsModalRef.current) { postOptionsModalRef.current.show(content); @@ -278,9 +302,15 @@ const WavesScreen = () => { setEnableScrollTop(enabled); }; - const _renderTagChip = activeTag ? ( - - ) : null; + const _renderFilterChip = + activeTag || activeAuthor ? ( + + ) : null; const _renderWavesScene = ({ route }: { route: { key: string } }) => { if (route.key === 'following') { @@ -295,6 +325,28 @@ const WavesScreen = () => { queryKey={`following:${currentAccount?.name}`} listRef={followingListRef} onTagPress={_handleTagFilter} + onAuthorPress={_handleAuthorFilter} + onOptionsPress={_handleOnOptionsPress} + onScrollStateChange={_handleScrollStateChange} + onVisibilityChange={({ deleteWave }) => { + activeDeleteWaveRef.current = deleteWave; + }} + isDarkTheme={isDarkTheme} + /> + + ); + } + + if (activeAuthor && authorQueryOptions) { + return ( + + {_renderFilterChip} + { @@ -309,12 +361,13 @@ const WavesScreen = () => { if (activeTag && tagQueryOptions) { return ( - {_renderTagChip} + {_renderFilterChip} { @@ -333,6 +386,7 @@ const WavesScreen = () => { queryKey="for-you" listRef={forYouListRef} onTagPress={_handleTagFilter} + onAuthorPress={_handleAuthorFilter} onOptionsPress={_handleOnOptionsPress} onScrollStateChange={_handleScrollStateChange} onVisibilityChange={({ deleteWave }) => { From 585929f1d88a652ecb25260dd07b04612773be65 Mon Sep 17 00:00:00 2001 From: feruz Date: Sun, 29 Mar 2026 20:56:14 +0300 Subject: [PATCH 2/4] unread count resillience --- src/providers/chat/mattermost.ts | 8 ++++ .../chats/container/chatsContainer.tsx | 42 +++++++++++++++---- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/providers/chat/mattermost.ts b/src/providers/chat/mattermost.ts index 5f225c29d2..2fed9aa329 100644 --- a/src/providers/chat/mattermost.ts +++ b/src/providers/chat/mattermost.ts @@ -68,6 +68,14 @@ export const getChannelUnreadTotal = (channel: any): number => { return 0; } + // If the channel has never been viewed, treat it as having no unreads. + // This prevents auto-joined or newly joined channels from inflating + // the badge with all historical messages. + const lastViewed = channel?.last_viewed_at || channel?.last_view_at || 0; + if (!lastViewed || lastViewed === 0) { + return 0; + } + const unreadMentionValues = [ channel?.unread_mentions, channel?.mention_count, diff --git a/src/screens/chats/container/chatsContainer.tsx b/src/screens/chats/container/chatsContainer.tsx index 60b09303f0..5390deb16e 100644 --- a/src/screens/chats/container/chatsContainer.tsx +++ b/src/screens/chats/container/chatsContainer.tsx @@ -126,13 +126,22 @@ const ChatsContainer = () => { // ============================================================================ const _getUnreadMeta = useCallback((channel: any) => { + const _zeroUnread = { + unreadMentions: 0, + unreadMessages: 0, + unreadCount: 0, + totalUnread: 0, + }; + if (channel?.is_muted) { - return { - unreadMentions: 0, - unreadMessages: 0, - unreadCount: 0, - totalUnread: 0, - }; + return _zeroUnread; + } + + // Never-viewed channels should not show unreads — prevents + // auto-joined channels from showing all history as new + const lastViewed = channel?.last_viewed_at || channel?.last_view_at || 0; + if (!lastViewed || lastViewed === 0) { + return _zeroUnread; } const unreadMentionValues = [ @@ -603,7 +612,23 @@ const ChatsContainer = () => { const joined = await joinMattermostChannel(channelId); const joinedId = _getChannelId(joined) || channelId; - const mergedChannel = { ...resolved?.resolvedChannel, ...channel, ...joined }; + + // Mark channel as viewed immediately after joining so historical + // messages don't inflate the unread count for newly joined users + try { + await markMattermostChannelViewed(joinedId); + } catch { + // non-critical — channel will show unreads until manually opened + } + + const mergedChannel = { + ...resolved?.resolvedChannel, + ...channel, + ...joined, + unread_messages: 0, + unread_mentions: 0, + mention_count: 0, + }; const communityIdentifier = safeExtractCommunityIdentifier(mergedChannel); setChannels((prev) => { @@ -621,6 +646,9 @@ const ChatsContainer = () => { return [mergedChannel, ...prev]; }); + // Refresh global badge to reflect the mark-as-viewed + _refreshGlobalUnreadChatCount(); + navigation.navigate( ROUTES.SCREENS.CHAT_THREAD as never, { From 41e49f2b6a1080f1b199ecededccc0e6cdf61dd7 Mon Sep 17 00:00:00 2001 From: feruz Date: Mon, 30 Mar 2026 07:36:25 +0300 Subject: [PATCH 3/4] sdk update --- package.json | 2 +- yarn.lock | 54 ++++++++-------------------------------------------- 2 files changed, 9 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index f009512cc9..57a111d9a1 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@babel/preset-typescript": "^7.26.0", "@babel/runtime": "^7.26.7", "@ecency/render-helper": "^2.4.25", - "@ecency/sdk": "^2.0.33", + "@ecency/sdk": "^2.0.34", "@esteemapp/dhive": "0.15.0", "@esteemapp/react-native-autocomplete-input": "^4.2.1", "@esteemapp/react-native-multi-slider": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index b95c7cdf90..364c65a10f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1121,20 +1121,7 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" -"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3": - version "7.28.3" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.3.tgz" - integrity sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.3" - "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.3" - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.2" - debug "^4.3.1" - -"@babel/traverse@^7.25.3", "@babel/traverse@^7.27.1", "@babel/traverse@^7.28.0", "@babel/traverse@^7.28.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4": +"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3", "@babel/traverse@^7.25.3", "@babel/traverse@^7.27.1", "@babel/traverse@^7.28.0", "@babel/traverse@^7.28.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4": version "7.28.3" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.3.tgz" integrity sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ== @@ -1193,10 +1180,10 @@ url "^0.11.0" xss "^1.0.9" -"@ecency/sdk@^2.0.33": - version "2.0.33" - resolved "https://registry.yarnpkg.com/@ecency/sdk/-/sdk-2.0.33.tgz#241a47e38b290e5540a95f97fa87113525b7c04b" - integrity sha512-osnqdyE43pHEPeufYVgaOhrEjnVFIzCXEQ1pWNn0CPmt3ekX+NMAAc/fKfUTDu0FI1MEg/Utrjkd4d0f/LdlaA== +"@ecency/sdk@^2.0.34": + version "2.0.34" + resolved "https://registry.yarnpkg.com/@ecency/sdk/-/sdk-2.0.34.tgz#be76ce7ef7aa37938a2779c109039a2bba3d1bd8" + integrity sha512-CQ/rtTMZ9kfySNUgnkT3snVvXEWgd8pyU7r/9ts5uF4Zc8msVA8LYuasZUqwoy+NAbT8nHTKzA+1zRaEoKNcVQ== "@egjs/hammerjs@^2.0.17": version "2.0.17" @@ -12702,7 +12689,7 @@ string-range@~1.2, string-range@~1.2.1: resolved "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz" integrity sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w== -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -12737,15 +12724,6 @@ string-width@^3.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" @@ -12860,7 +12838,7 @@ stringify-object@^3.2.2: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12888,13 +12866,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz" @@ -13851,7 +13822,7 @@ word-wrap@^1.2.5, word-wrap@~1.2.3: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -13877,15 +13848,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz" From 6f105a3e46a907f1b400aa85a3e9b7f671cbdf96 Mon Sep 17 00:00:00 2001 From: feruz Date: Mon, 30 Mar 2026 09:09:39 +0300 Subject: [PATCH 4/4] fix proper unread --- src/providers/chat/mattermost.ts | 10 +++++----- .../chats/container/chatsContainer.tsx | 19 ++++++++++++------- src/screens/waves/screen/wavesScreen.tsx | 4 +++- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/providers/chat/mattermost.ts b/src/providers/chat/mattermost.ts index 2fed9aa329..2547dcdc98 100644 --- a/src/providers/chat/mattermost.ts +++ b/src/providers/chat/mattermost.ts @@ -68,11 +68,11 @@ export const getChannelUnreadTotal = (channel: any): number => { return 0; } - // If the channel has never been viewed, treat it as having no unreads. - // This prevents auto-joined or newly joined channels from inflating - // the badge with all historical messages. - const lastViewed = channel?.last_viewed_at || channel?.last_view_at || 0; - if (!lastViewed || lastViewed === 0) { + // Channels that have never been viewed (null/undefined last_viewed_at) + // should not count unreads — prevents auto-joined channels from + // inflating the badge with all historical messages. + const lastViewed = channel?.last_viewed_at ?? channel?.last_view_at; + if (lastViewed == null) { return 0; } diff --git a/src/screens/chats/container/chatsContainer.tsx b/src/screens/chats/container/chatsContainer.tsx index 5390deb16e..1a2c3165fb 100644 --- a/src/screens/chats/container/chatsContainer.tsx +++ b/src/screens/chats/container/chatsContainer.tsx @@ -137,10 +137,11 @@ const ChatsContainer = () => { return _zeroUnread; } - // Never-viewed channels should not show unreads — prevents - // auto-joined channels from showing all history as new - const lastViewed = channel?.last_viewed_at || channel?.last_view_at || 0; - if (!lastViewed || lastViewed === 0) { + // Channels that have never been viewed (null/undefined) should + // not show unreads — prevents auto-joined channels from showing + // all historical messages as new + const lastViewed = channel?.last_viewed_at ?? channel?.last_view_at; + if (lastViewed == null) { return _zeroUnread; } @@ -615,8 +616,10 @@ const ChatsContainer = () => { // Mark channel as viewed immediately after joining so historical // messages don't inflate the unread count for newly joined users + let viewedSuccessfully = false; try { await markMattermostChannelViewed(joinedId); + viewedSuccessfully = true; } catch { // non-critical — channel will show unreads until manually opened } @@ -625,9 +628,11 @@ const ChatsContainer = () => { ...resolved?.resolvedChannel, ...channel, ...joined, - unread_messages: 0, - unread_mentions: 0, - mention_count: 0, + ...(viewedSuccessfully && { + unread_messages: 0, + unread_mentions: 0, + mention_count: 0, + }), }; const communityIdentifier = safeExtractCommunityIdentifier(mergedChannel); diff --git a/src/screens/waves/screen/wavesScreen.tsx b/src/screens/waves/screen/wavesScreen.tsx index 3f24fdc3d4..98702c9eec 100644 --- a/src/screens/waves/screen/wavesScreen.tsx +++ b/src/screens/waves/screen/wavesScreen.tsx @@ -235,7 +235,7 @@ const WavesScreen = () => { return; } - if (tab === feedType && !activeTag) { + if (tab === feedType && !activeTag && !activeAuthor) { activeListRef.current?.scrollToOffset({ offset: 0, animated: false }); setEnableScrollTop(false); return; @@ -243,6 +243,7 @@ const WavesScreen = () => { if (tab === 'following') { setActiveTag(null); + setActiveAuthor(null); } setEnableScrollTop(false); @@ -252,6 +253,7 @@ const WavesScreen = () => { const _handleTagFilter = useCallback((tag: string) => { setFeedType((prev) => (prev === 'following' ? 'for-you' : prev)); setEnableScrollTop(false); + setActiveAuthor(null); setActiveTag(tag); }, []);