From 4c717a0cb7eb479dcd6d6c836d287bacb8d3354d Mon Sep 17 00:00:00 2001 From: thislight Date: Sat, 23 Nov 2024 23:47:52 +0800 Subject: [PATCH] TootComposer: use useAppLocale --- src/timelines/TootComposer.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/timelines/TootComposer.tsx b/src/timelines/TootComposer.tsx index 3c6b696..2895c67 100644 --- a/src/timelines/TootComposer.tsx +++ b/src/timelines/TootComposer.tsx @@ -42,7 +42,7 @@ import { import type { Account } from "../accounts/stores"; import "./TootComposer.css"; import BottomSheet from "~material/BottomSheet"; -import { useLanguage } from "~platform/i18n"; +import { useAppLocale } from "~platform/i18n"; import iso639_1 from "iso-639-1"; import ChooseTootLang from "./ChooseTootLang"; import type { mastodon } from "masto"; @@ -98,7 +98,8 @@ const TootVisibilityPickerDialog: Component<{ style={{ "border-top": "1px solid #ddd", background: "var(--tutu-color-surface)", - padding: "8px 16px calc(8px + var(--safe-area-inset-bottom, 0px))", + padding: + "8px 16px calc(8px + var(--safe-area-inset-bottom, 0px))", width: "100%", "text-align": "end", }} @@ -232,7 +233,7 @@ const TootComposer: Component<{ const [permPicker, setPermPicker] = createSignal(false); const [language, setLanguage] = createSignal("en"); const [langPickerOpen, setLangPickerOpen] = createSignal(false); - const appLanguage = useLanguage(); + const { language: appLanguage } = useAppLocale(); const [openMenu, menuState] = createManagedMenuState(); const randomPlaceholder = useRandomChoice(() => [