From fcffcd35af4635829040516bb571ce225ffe9551 Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 7 Oct 2016 09:29:53 +0900 Subject: [PATCH] DRY --- js/views/message_view.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/js/views/message_view.js b/js/views/message_view.js index 4dfbbf46..c34dba33 100644 --- a/js/views/message_view.js +++ b/js/views/message_view.js @@ -58,18 +58,14 @@ var seconds = this.model.get('expirationTimerUpdate').expireTimer; var timerMessage; if (this.conversation.id === textsecure.storage.user.getNumber()) { - timerMessage = { - content: i18n('youChangedTheTimer', - Whisper.ExpirationTimerOptions.getName(seconds)) - }; + timerMessage = i18n('youChangedTheTimer', + Whisper.ExpirationTimerOptions.getName(seconds)); } else { - timerMessage = { - content: i18n('theyChangedTheTimer', [ - this.conversation.getTitle(), - Whisper.ExpirationTimerOptions.getName(seconds)]) - }; + timerMessage = i18n('theyChangedTheTimer', [ + this.conversation.getTitle(), + Whisper.ExpirationTimerOptions.getName(seconds)]); } - return timerMessage; + return { content: timerMessage }; } });