From 65b307d423fa86a1d6ceda318bf5daa768663825 Mon Sep 17 00:00:00 2001 From: Rudy Fraser Date: Tue, 30 Jun 2026 16:08:02 -0400 Subject: [PATCH] fix(community-posts): preserve ?collection= on post URLs + dismiss badge tooltip on unmount #5 postUriToRelativePath now appends ?collection= for any post URI whose collection isn't app.bsky.feed.post. Every navigation that goes through this helper (liked-posts, share URLs, in-app links, notification routes) now lands on the PostThread screen with the correct route param, so community-post detail views resolve instead of falling back to 'Post not found'. #6 CommunityOnlyBadge resets its tooltip visible state on unmount so the floating tooltip portal disappears when the user navigates away mid-tap. --- src/components/CommunityOnlyBadge.tsx | 6 +++++- src/lib/strings/url-helpers.ts | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/CommunityOnlyBadge.tsx b/src/components/CommunityOnlyBadge.tsx index b23acc607..b7465f344 100644 --- a/src/components/CommunityOnlyBadge.tsx +++ b/src/components/CommunityOnlyBadge.tsx @@ -1,4 +1,4 @@ -import {useState} from 'react' +import {useEffect, useState} from 'react' import {Pressable, View} from 'react-native' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' @@ -21,6 +21,10 @@ export function CommunityOnlyBadge() { const {_} = useLingui() const [visible, setVisible] = useState(false) + useEffect(() => { + return () => setVisible(false) + }, []) + return (