fix: prevent nesting of formatted text reactions
Usage of map was causing issues if the text reaction had special characters. Closes #205
This commit is contained in:
@@ -33,6 +33,7 @@ import Animated, {
|
||||
import { REACTION_EMOJIS, type Reactions } from "@/api/types";
|
||||
import type { Human } from "@/api/types";
|
||||
import { resolveHumanDisplay } from "@/lib/humans";
|
||||
import { sanitizeReactionText } from "@/lib/firestore-particles";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useSuspendPlayback } from "@/hooks/use-suspend-playback";
|
||||
|
||||
@@ -327,7 +328,9 @@ export function ReactionSheet({
|
||||
<View className="flex-1 bg-white/10 rounded-full px-4 py-2.5">
|
||||
<TextInput
|
||||
value={text}
|
||||
onChangeText={(v) => setText(v.slice(0, TEXT_REACTION_MAX))}
|
||||
onChangeText={(v) =>
|
||||
setText(sanitizeReactionText(v).slice(0, TEXT_REACTION_MAX))
|
||||
}
|
||||
placeholder="Send a quick reply..."
|
||||
placeholderTextColor="rgba(255,255,255,0.4)"
|
||||
maxLength={TEXT_REACTION_MAX}
|
||||
|
||||
Reference in New Issue
Block a user