Use conversationId to hide/goToChat in StoryViewer
This commit is contained in:
parent
7ce4beb270
commit
afc14aedd1
1 changed files with 5 additions and 4 deletions
|
@ -147,7 +147,6 @@ export const StoryViewer = ({
|
|||
avatarPath,
|
||||
color,
|
||||
isMe,
|
||||
id,
|
||||
firstName,
|
||||
name,
|
||||
profileName,
|
||||
|
@ -155,6 +154,8 @@ export const StoryViewer = ({
|
|||
title,
|
||||
} = story.sender;
|
||||
|
||||
const conversationId = group?.id || story.sender.id;
|
||||
|
||||
const [hasStoryViewsNRepliesModal, setHasStoryViewsNRepliesModal] =
|
||||
useState(false);
|
||||
const [hasStoryDetailsModal, setHasStoryDetailsModal] = useState(
|
||||
|
@ -448,7 +449,7 @@ export const StoryViewer = ({
|
|||
: i18n('StoryListItem__hide'),
|
||||
onClick: () => {
|
||||
if (isHidden) {
|
||||
onHideStory(id);
|
||||
onHideStory(conversationId);
|
||||
} else {
|
||||
setHasConfirmHideStory(true);
|
||||
}
|
||||
|
@ -458,7 +459,7 @@ export const StoryViewer = ({
|
|||
icon: 'StoryListItem__icon--chat',
|
||||
label: i18n('StoryListItem__go-to-chat'),
|
||||
onClick: () => {
|
||||
onGoToConversation(id);
|
||||
onGoToConversation(conversationId);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -785,7 +786,7 @@ export const StoryViewer = ({
|
|||
actions={[
|
||||
{
|
||||
action: () => {
|
||||
onHideStory(id);
|
||||
onHideStory(conversationId);
|
||||
onClose();
|
||||
},
|
||||
style: 'affirmative',
|
||||
|
|
Loading…
Reference in a new issue