feat: added legacy mode timer notification copy

pull/2660/head
William Grant 2 years ago
parent 349b513051
commit 03bc6706f6

@ -182,7 +182,9 @@
"timerModeRead": "read",
"timerModeSent": "sent",
"youChangedTheTimer": "You have set messages to disappear $time$ after they have been $mode$",
"youChangedTheTimerLegacy": "You set the disappearing message timer to $time$",
"theyChangedTheTimer": "$name$ has set messages to disappear $time$ after they have been $mode$",
"theyChangedTheTimerLegacy": "$name$ set the disappearing message timer to $time$",
"timerOption_0_seconds": "Off",
"timerOption_5_seconds": "5 seconds",
"timerOption_10_seconds": "10 seconds",

@ -29,8 +29,11 @@ export const TimerNotification = (props: PropsForExpirationTimer) => {
} = props;
const contact = profileName || pubkey;
// TODO legacy messages support will be removed in a future release
const mode =
expirationType === 'deleteAfterRead'
expirationType === 'legacy'
? null
: expirationType === 'deleteAfterRead'
? window.i18n('timerModeRead')
: window.i18n('timerModeSent');
@ -39,13 +42,17 @@ export const TimerNotification = (props: PropsForExpirationTimer) => {
case 'fromOther':
textToRender = disabled
? window.i18n('disabledDisappearingMessages', [contact, timespan])
: window.i18n('theyChangedTheTimer', [contact, timespan, mode]);
: mode
? window.i18n('theyChangedTheTimer', [contact, timespan, mode])
: window.i18n('theyChangedTheTimerLegacy', [contact, timespan]);
break;
case 'fromMe':
case 'fromSync':
textToRender = disabled
? window.i18n('youDisabledDisappearingMessages')
: window.i18n('youChangedTheTimer', [timespan, mode]);
: mode
? window.i18n('youChangedTheTimer', [timespan, mode])
: window.i18n('youChangedTheTimerLegacy', [timespan]);
break;
default:
throw missingCaseError(type);

Loading…
Cancel
Save