UI for when read receipts are turned off

This commit is contained in:
Josh Perez 2022-08-31 12:11:14 -04:00 committed by GitHub
parent 7632f31cf2
commit 39143015c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 135 additions and 33 deletions

View file

@ -59,6 +59,7 @@ export type PropsType = {
>;
hasActiveCall?: boolean;
hasAllStoriesMuted: boolean;
hasReadReceiptSetting: boolean;
i18n: LocalizerType;
loadStoryReplies: (conversationId: string, messageId: string) => unknown;
markStoryRead: (mId: string) => unknown;
@ -107,6 +108,7 @@ export const StoryViewer = ({
group,
hasActiveCall,
hasAllStoriesMuted,
hasReadReceiptSetting,
i18n,
loadStoryReplies,
markStoryRead,
@ -661,7 +663,11 @@ export const StoryViewer = ({
<>
{sendState || replyCount > 0 ? (
<span className="StoryViewer__reply__chevron">
{sendState && !hasReadReceiptSetting && !replyCount && (
<>{i18n('StoryViewer__views-off')}</>
)}
{sendState &&
hasReadReceiptSetting &&
(viewCount === 1 ? (
<Intl
i18n={i18n}
@ -749,6 +755,7 @@ export const StoryViewer = ({
authorTitle={firstName || title}
canReply={Boolean(canReply)}
getPreferredBadge={getPreferredBadge}
hasReadReceiptSetting={hasReadReceiptSetting}
i18n={i18n}
isGroupStory={isGroupStory}
onClose={() => setHasStoryViewsNRepliesModal(false)}