From 47e36a354bac3ebfb256f3b281b7d02f03181df8 Mon Sep 17 00:00:00 2001 From: thislight Date: Tue, 26 Nov 2024 15:07:36 +0800 Subject: [PATCH] TootBottomSheet: fix toot could not expand --- src/timelines/TootBottomSheet.tsx | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/timelines/TootBottomSheet.tsx b/src/timelines/TootBottomSheet.tsx index 065a754..79c3ac4 100644 --- a/src/timelines/TootBottomSheet.tsx +++ b/src/timelines/TootBottomSheet.tsx @@ -29,6 +29,9 @@ import TootList from "./TootList"; import "./TootBottomSheet.css"; import { useNavigator } from "~platform/StackedRouter"; import BackButton from "~platform/BackButton"; +import ItemSelectionProvider, { + createSingluarItemSelection, +} from "./toots/ItemSelectionProvider"; let cachedEntry: [string, mastodon.v1.Status] | undefined; @@ -44,13 +47,11 @@ function getCache(acct: string, id: string) { const TootBottomSheet: Component = (props) => { const params = useParams<{ acct: string; id: string }>(); - const location = useLocation<{ - tootReply?: boolean; - }>(); - const { pop, push } = useNavigator(); + const { push } = useNavigator(); const time = createTimeSource(); const acctText = () => decodeURIComponent(params.acct); const session = useSessionForAcctStr(acctText); + const [, selectionState] = createSingluarItemSelection(); const [remoteToot, { mutate: setRemoteToot }] = createResource( () => [session().client, params.id] as const, @@ -322,11 +323,13 @@ const TootBottomSheet: Component = (props) => { - + + +