From 634f1ae9f4ebbcaadb5f077bfe68013b156558e8 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 28 Feb 2018 17:26:41 -0800 Subject: [PATCH] Don't pop conversations with timer change to top (#2084) * Don't re-sort conversation list after expiration timer change Now that we respond to the expiration timer included in contact and group sync messages, we need to ensure that this doesn't pop conversations to the top of the list. * Introduce explaining variable for updateLastMessage filter --- js/models/conversations.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 63e244ac1f..cfb935f866 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -675,7 +675,9 @@ return collection.fetchConversation(this.id, 1).then(function() { var lastMessage = collection.at(0); if (lastMessage) { - if (lastMessage.get('type') === 'verified-change') { + var type = lastMessage.get('type'); + var shouldSkipUpdate = type === 'verified-change' || lastMessage.get('expirationTimerUpdate'); + if (shouldSkipUpdate) { return; } this.set({