Functional context menu in story viewer
This commit is contained in:
parent
d6b58d23d6
commit
6e7092c294
7 changed files with 98 additions and 20 deletions
|
@ -62,8 +62,8 @@ export type PropsType = Pick<
|
|||
> & {
|
||||
i18n: LocalizerType;
|
||||
onClick: () => unknown;
|
||||
onGoToConversation?: (conversationId: string) => unknown;
|
||||
onHideStory?: (conversationId: string) => unknown;
|
||||
onGoToConversation: (conversationId: string) => unknown;
|
||||
onHideStory: (conversationId: string) => unknown;
|
||||
queueStoryDownload: (storyId: string) => unknown;
|
||||
story: StoryViewType;
|
||||
};
|
||||
|
@ -217,7 +217,7 @@ export const StoryListItem = ({
|
|||
: i18n('StoryListItem__hide'),
|
||||
onClick: () => {
|
||||
if (isHidden) {
|
||||
onHideStory?.(sender.id);
|
||||
onHideStory(sender.id);
|
||||
} else {
|
||||
setHasConfirmHideStory(true);
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ export const StoryListItem = ({
|
|||
icon: 'StoryListItem__icon--chat',
|
||||
label: i18n('StoryListItem__go-to-chat'),
|
||||
onClick: () => {
|
||||
onGoToConversation?.(sender.id);
|
||||
onGoToConversation(sender.id);
|
||||
},
|
||||
},
|
||||
]}
|
||||
|
@ -242,7 +242,7 @@ export const StoryListItem = ({
|
|||
<ConfirmationDialog
|
||||
actions={[
|
||||
{
|
||||
action: () => onHideStory?.(sender.id),
|
||||
action: () => onHideStory(sender.id),
|
||||
style: 'affirmative',
|
||||
text: i18n('StoryListItem__hide-modal--confirm'),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue