From 81804176118d293aef4a02909f6a06a3ce709349 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 2 Aug 2018 21:12:55 -0700 Subject: [PATCH] Update conversation first on timer change to eliminate flicker --- js/models/conversations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 75a4a1025..aa8b9c342 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -907,6 +907,8 @@ // to be above the message that initiated that change, hence the subtraction. const timestamp = (receivedAt || Date.now()) - 1; + await wrapDeferred(this.save({ expireTimer })); + const message = this.messageCollection.add({ // Even though this isn't reflected to the user, we want to place the last seen // indicator above it. We set it to 'unread' to trigger that placement. @@ -935,8 +937,6 @@ }); message.set({ id }); - await wrapDeferred(this.save({ expireTimer })); - // if change was made remotely, don't send it to the number/group if (receivedAt) { return message;