Disappearing messages: show 'disabled' instead of 'set to off'

This commit is contained in:
Scott Nonnenberg 2018-07-24 14:38:58 -07:00
parent 1a01e38d5c
commit e80857562a
7 changed files with 111 additions and 11 deletions

View file

@ -199,6 +199,10 @@
}
if (this.isExpirationTimerUpdate()) {
const { expireTimer } = this.get('expirationTimerUpdate');
if (!expireTimer) {
return i18n('disappearingMessagesDisabled');
}
return i18n(
'timerSetTo',
Whisper.ExpirationTimerOptions.getAbbreviated(expireTimer || 0)
@ -308,11 +312,13 @@
'expirationTimerUpdate'
);
const timespan = Whisper.ExpirationTimerOptions.getName(expireTimer || 0);
const disabled = !expireTimer;
const basicProps = {
type: 'fromOther',
...this.findAndFormatContact(source),
timespan,
disabled,
};
if (source === this.OUR_NUMBER) {