Story view receipts setting

This commit is contained in:
Fedor Indutny 2022-10-25 15:18:42 -07:00 committed by GitHub
parent ad42d98774
commit 3702a67975
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 161 additions and 35 deletions

View file

@ -67,7 +67,7 @@ export type PropsType = {
>;
hasActiveCall?: boolean;
hasAllStoriesMuted: boolean;
hasReadReceiptSetting: boolean;
hasViewReceiptSetting: boolean;
i18n: LocalizerType;
loadStoryReplies: (conversationId: string, messageId: string) => unknown;
markStoryRead: (mId: string) => unknown;
@ -117,7 +117,7 @@ export const StoryViewer = ({
group,
hasActiveCall,
hasAllStoriesMuted,
hasReadReceiptSetting,
hasViewReceiptSetting,
i18n,
loadStoryReplies,
markStoryRead,
@ -722,11 +722,11 @@ export const StoryViewer = ({
<>
{isSent || replyCount > 0 ? (
<span className="StoryViewer__reply__chevron">
{isSent && !hasReadReceiptSetting && !replyCount && (
{isSent && !hasViewReceiptSetting && !replyCount && (
<>{i18n('StoryViewer__views-off')}</>
)}
{isSent &&
hasReadReceiptSetting &&
hasViewReceiptSetting &&
(viewCount === 1 ? (
<Intl
i18n={i18n}
@ -795,7 +795,7 @@ export const StoryViewer = ({
authorTitle={firstName || title}
canReply={Boolean(canReply)}
getPreferredBadge={getPreferredBadge}
hasReadReceiptSetting={hasReadReceiptSetting}
hasViewReceiptSetting={hasViewReceiptSetting}
hasViewsCapability={isSent}
i18n={i18n}
group={group}