From bfe9cf9f3843a7900032909d2855cd5d9782bfc4 Mon Sep 17 00:00:00 2001 From: Alvaro <110414366+alvaro-signal@users.noreply.github.com> Date: Fri, 14 Oct 2022 14:49:46 -0600 Subject: [PATCH] Show 'Views off' when read receipts are off --- _locales/en/messages.json | 12 ++++++++++-- ts/components/MyStories.tsx | 14 +++++++------- ts/components/Stories.tsx | 3 +++ ts/state/smart/Stories.tsx | 8 +++++++- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 4f8f91e347..a4447b9ffa 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -5373,12 +5373,20 @@ }, "MyStories__views--singular": { "message": "$num$ view", - "description": "Number of views your story has" + "description": "(deleted 2022/10/13) Number of views your story has" }, "MyStories__views--plural": { "message": "$num$ views", + "description": "(deleted 2022/10/13) Number of views your story has" + }, + "icu:MyStories__views": { + "messageformat": "{views, plural, one {1 view} other {# views}}", "description": "Number of views your story has" }, + "icu:MyStories__views-off": { + "messageformat": "Views off", + "description": "Shown next to the user's story when the user has read receipts turned off" + }, "MyStories__replies--singular": { "message": "$num$ reply", "description": "Number of replies your story has" @@ -5665,7 +5673,7 @@ }, "StoryViewer__views-off": { "message": "Views off", - "description": "When the user has read receipts turned off" + "description": "(deleted 2022/10/13) When the user has read receipts turned off" }, "StoryDetailsModal__sent-time": { "message": "Sent $time$", diff --git a/ts/components/MyStories.tsx b/ts/components/MyStories.tsx index ff35f69d56..98759a7b5c 100644 --- a/ts/components/MyStories.tsx +++ b/ts/components/MyStories.tsx @@ -23,6 +23,7 @@ export type PropsType = { onSave: (story: StoryViewType) => unknown; queueStoryDownload: (storyId: string) => unknown; viewStory: ViewStoryActionCreatorType; + hasReadReceiptSetting: boolean; }; export const MyStories = ({ @@ -34,6 +35,7 @@ export const MyStories = ({ onSave, queueStoryDownload, viewStory, + hasReadReceiptSetting, }: PropsType): JSX.Element => { const [confirmDeleteStory, setConfirmDeleteStory] = useState< StoryViewType | undefined @@ -105,13 +107,11 @@ export const MyStories = ({ />