From f7b2627991943d0a2bf6ca86fb8e52c5b86454bb Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:38:24 -0400 Subject: [PATCH] Fixes isHidden prop from not being present in StoryView --- ts/components/StoryViewer.tsx | 5 ++++- ts/state/selectors/stories.ts | 1 + ts/types/Stories.ts | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/components/StoryViewer.tsx b/ts/components/StoryViewer.tsx index 92bed54e1..027d597f5 100644 --- a/ts/components/StoryViewer.tsx +++ b/ts/components/StoryViewer.tsx @@ -765,7 +765,10 @@ export const StoryViewer = ({ onHideStory(id), + action: () => { + onHideStory(id); + onClose(); + }, style: 'affirmative', text: i18n('StoryListItem__hide-modal--confirm'), }, diff --git a/ts/state/selectors/stories.ts b/ts/state/selectors/stories.ts index 5bdc0a821..4aed1c09a 100644 --- a/ts/state/selectors/stories.ts +++ b/ts/state/selectors/stories.ts @@ -153,6 +153,7 @@ export function getStoryView( return { attachment, canReply: canReply(story, undefined, conversationSelector), + isHidden: Boolean(sender.hideStory), isUnread: story.readStatus === ReadStatus.Unread, messageId: story.messageId, sender, diff --git a/ts/types/Stories.ts b/ts/types/Stories.ts index 7f35aa0fc..8dfc28527 100644 --- a/ts/types/Stories.ts +++ b/ts/types/Stories.ts @@ -78,6 +78,7 @@ export type StoryViewType = { | 'badges' | 'color' | 'firstName' + | 'hideStory' | 'id' | 'isMe' | 'name'