Add emoji button to text story creation

This commit is contained in:
Josh Perez 2022-11-28 13:52:16 -05:00 committed by GitHub
parent d6d53f9d18
commit 77f92b6cc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 285 additions and 213 deletions

View file

@ -15,6 +15,7 @@ import type { Props as StickerButtonProps } from './stickers/StickerButton';
import type { PropsType as SendStoryModalPropsType } from './SendStoryModal';
import type { UUIDStringType } from '../types/UUID';
import type { imageToBlurHash } from '../util/imageToBlurHash';
import type { PropsType as TextStoryCreatorPropsType } from './TextStoryCreator';
import { TEXT_ATTACHMENT } from '../types/MIME';
import { isVideoAttachment } from '../types/Attachment';
@ -70,6 +71,10 @@ export type PropsType = {
| 'toggleGroupsForStorySend'
| 'mostRecentActiveStoryTimestampByGroupOrDistributionList'
| 'toggleSignalConnectionsModal'
> &
Pick<
TextStoryCreatorPropsType,
'onUseEmoji' | 'skinTone' | 'onSetSkinTone' | 'recentEmojis'
>;
export function StoryCreator({
@ -87,7 +92,7 @@ export function StoryCreator({
isSending,
linkPreview,
me,
ourConversationId,
mostRecentActiveStoryTimestampByGroupOrDistributionList,
onClose,
onDeleteList,
onDistributionListCreated,
@ -96,15 +101,19 @@ export function StoryCreator({
onRepliesNReactionsChanged,
onSelectedStoryList,
onSend,
onSetSkinTone,
onUseEmoji,
onViewersUpdated,
ourConversationId,
processAttachment,
recentEmojis,
recentStickers,
renderCompositionTextArea,
sendStoryModalOpenStateChanged,
setMyStoriesToAllSignalConnections,
signalConnections,
skinTone,
toggleGroupsForStorySend,
mostRecentActiveStoryTimestampByGroupOrDistributionList,
toggleSignalConnectionsModal,
}: PropsType): JSX.Element {
const [draftAttachment, setDraftAttachment] = useState<
@ -236,6 +245,10 @@ export function StoryCreator({
});
setIsReadyToSend(true);
}}
onUseEmoji={onUseEmoji}
onSetSkinTone={onSetSkinTone}
recentEmojis={recentEmojis}
skinTone={skinTone}
/>
)}
</>