Emojify story captions

This commit is contained in:
Josh Perez 2022-10-25 13:15:18 -04:00 committed by GitHub
parent 4f3280b415
commit e3c7072ef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -130,6 +130,18 @@ Caption.args = {
},
};
export const EmojiCaption = Template.bind({});
EmojiCaption.args = {
story: {
...getFakeStoryView(),
attachment: fakeAttachment({
caption: 'WOOOOOOOOW 🥰',
path: 'file.jpg',
url: '/fixtures/nathan-anderson-316188-unsplash.jpg',
}),
},
};
export const LongCaption = Template.bind({});
LongCaption.args = {
story: {

View file

@ -24,6 +24,7 @@ import { AnimatedEmojiGalore } from './AnimatedEmojiGalore';
import { Avatar, AvatarSize } from './Avatar';
import { ConfirmationDialog } from './ConfirmationDialog';
import { ContextMenu } from './ContextMenu';
import { Emojify } from './conversation/Emojify';
import { Intl } from './Intl';
import { MessageTimestamp } from './conversation/MessageTimestamp';
import { SendStatus } from '../messages/MessageSendState';
@ -579,7 +580,7 @@ export const StoryViewer = ({
<div className="StoryViewer__meta">
{caption && (
<div className="StoryViewer__caption">
{caption.text}
<Emojify text={caption.text} />
{caption.hasReadMore && !hasExpandedCaption && (
<button
className="MessageBody__read-more"