Live video on the AT Protocol
79
fork

Configure Feed

Select the types of activity you want to include in your feed.

Randomize emoji icon on hover out of selector button

+14 -2
+14 -2
js/components/src/components/chat/chat-box.tsx
··· 405 405 { justifyContent: "flex-end" }, 406 406 ]} 407 407 > 408 - <Pressable onPress={() => setShowEmojiSelector(!showEmojiSelector)}> 408 + <Pressable 409 + onPress={() => setShowEmojiSelector(!showEmojiSelector)} 410 + onHoverOut={() => { 411 + let oldMoji = COOL_EMOJI_LIST[emojiIconIndex]; 412 + let newMojiIndex = Math.floor( 413 + Math.random() * COOL_EMOJI_LIST.length, 414 + ); 415 + while (COOL_EMOJI_LIST[newMojiIndex] === oldMoji) { 416 + newMojiIndex = Math.floor(Math.random() * COOL_EMOJI_LIST.length); 417 + } 418 + setEmojiIconIndex(newMojiIndex); 419 + }} 420 + > 409 421 <Button 410 422 variant="secondary" 411 423 style={{ borderRadius: 16, height: 36, maxWidth: 36 }} 412 424 onPress={() => { 413 425 !message.endsWith("@") && setMessage(message + "@"); 414 - setShowSuggestions(true); 426 + updateSuggestions("@"); 415 427 }} 416 428 > 417 429 <Text>@</Text>