diff --git a/ts/components/conversation/conversation-details/ConversationDetails.tsx b/ts/components/conversation/conversation-details/ConversationDetails.tsx index b221625675be..fb2c670fdcb1 100644 --- a/ts/components/conversation/conversation-details/ConversationDetails.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetails.tsx @@ -63,6 +63,10 @@ export type StateProps = { export type Props = StateProps; +const expirationTimerDefaultSet = new Set( + expirationTimer.DEFAULT_DURATIONS_IN_SECONDS +); + export const ConversationDetails: React.ComponentType = ({ addMembers, canEditGroupInfo, @@ -196,6 +200,13 @@ export const ConversationDetails: React.ComponentType = ({ throw missingCaseError(modalState); } + const expireTimer = conversation.expireTimer || 0; + + let expirationTimerDurations = expirationTimer.DEFAULT_DURATIONS_IN_SECONDS; + if (!expirationTimerDefaultSet.has(expireTimer)) { + expirationTimerDurations = [...expirationTimerDurations, expireTimer]; + } + return (
= ({ label={i18n('ConversationDetails--disappearing-messages-label')} right={
- + {expirationTimerDurations.map((seconds: number) => { + const label = expirationTimer.format(i18n, seconds); + return ( + + ); + })}
}