diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ceb279b650f..1a83a27c807 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -6918,7 +6918,7 @@ "description": "aria-label for the story list button" }, "icu:StoryListItem__unhide": { - "messageformat": "Show stories", + "messageformat": "Unhide story", "description": "Label for menu item to un-hide the story" }, "icu:StoryListItem__hide": { diff --git a/stylesheets/components/StoryListItem.scss b/stylesheets/components/StoryListItem.scss index 13a90304ed1..afa51b3dde9 100644 --- a/stylesheets/components/StoryListItem.scss +++ b/stylesheets/components/StoryListItem.scss @@ -189,6 +189,12 @@ @include StoryListItem__Icon('../images/icons/v3/x/x-circle-compact.svg'); } + &--unhide { + @include StoryListItem__Icon( + '../images/icons/v3/check/check-circle-compact.svg' + ); + } + &--info { @include StoryListItem__Icon('../images/icons/v3/info/info-compact.svg'); } diff --git a/ts/components/StoryListItem.tsx b/ts/components/StoryListItem.tsx index ead73748001..f901ad37da4 100644 --- a/ts/components/StoryListItem.tsx +++ b/ts/components/StoryListItem.tsx @@ -117,21 +117,24 @@ export function StoryListItem({ repliesElement =
; } - const menuOptions = [ - { - icon: 'StoryListItem__icon--hide', - label: isHidden - ? i18n('icu:StoryListItem__unhide') - : i18n('icu:StoryListItem__hide'), + const menuOptions = []; + if (isHidden) { + menuOptions.push({ + icon: 'StoryListItem__icon--unhide', + label: i18n('icu:StoryListItem__unhide'), onClick: () => { - if (isHidden) { - onHideStory(conversationId); - } else { - setHasConfirmHideStory(true); - } + onHideStory(conversationId); }, - }, - ]; + }); + } else { + menuOptions.push({ + icon: 'StoryListItem__icon--hide', + label: i18n('icu:StoryListItem__hide'), + onClick: () => { + setHasConfirmHideStory(true); + }, + }); + } if (!isSignalOfficial) { menuOptions.push({ diff --git a/ts/components/StoryViewer.tsx b/ts/components/StoryViewer.tsx index fad938dcc8f..ebb34454bb0 100644 --- a/ts/components/StoryViewer.tsx +++ b/ts/components/StoryViewer.tsx @@ -516,7 +516,9 @@ export function StoryViewer({ onClick: () => setCurrentViewTarget(StoryViewTargetType.Details), }, { - icon: 'StoryListItem__icon--hide', + icon: isHidden + ? 'StoryListItem__icon--unhide' + : 'StoryListItem__icon--hide', label: isHidden ? i18n('icu:StoryListItem__unhide') : i18n('icu:StoryListItem__hide'),