From 8afd84758c7976a98b72745aeec123a8f3678b99 Mon Sep 17 00:00:00 2001 From: Supertiger Date: Tue, 19 Nov 2024 13:21:59 +0000 Subject: [PATCH] increase post character limit to 1500 for supporters --- src/components/PostsArea.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/PostsArea.tsx b/src/components/PostsArea.tsx index 4dbde64f..14a21f41 100644 --- a/src/components/PostsArea.tsx +++ b/src/components/PostsArea.tsx @@ -55,6 +55,7 @@ import { AdvancedMarkupOptions } from "./advanced-markup-options/AdvancedMarkupO import { PostItem } from "./post-area/PostItem"; import { MetaTitle } from "@/common/MetaTitle"; import DropDown from "./ui/drop-down/DropDown"; +import { hasBit, USER_BADGES } from "@/chat-api/Bitwise"; const PhotoEditor = lazy(() => import("./ui/photo-editor/PhotoEditor")); @@ -91,7 +92,10 @@ function NewPostArea(props: { postId?: string; primaryColor?: string; }) { - const { posts } = useStore(); + const { posts, account } = useStore(); + + const isSupporter = () => + hasBit(account.user()?.badges || 0, USER_BADGES.SUPPORTER.bit); const [content, setContent] = createSignal(""); const { isPortalOpened } = useCustomPortal(); const [attachedFile, setAttachedFile] = createSignal( @@ -209,7 +213,7 @@ function NewPostArea(props: { > setTimeout(() => setInputFocused(false), 100)} onFocus={() => setTimeout(() => setInputFocused(true), 100)}