From 3a50a892dcf278a8bd2a4530ea4bcdfe84d3bb73 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 18 Jul 2016 18:05:49 -0700 Subject: [PATCH] Don't sort if already sorted // FREEBIE --- js/views/conversation_list_view.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/views/conversation_list_view.js b/js/views/conversation_list_view.js index a4e3e5bc..d7f3f7e5 100644 --- a/js/views/conversation_list_view.js +++ b/js/views/conversation_list_view.js @@ -13,6 +13,9 @@ var $el = this.$('.' + conversation.cid); if ($el && $el.length > 0) { var index = getInboxCollection().indexOf(conversation); + if (index === this.$el.index($el)) { + return; + } if (index === 0) { this.$el.prepend($el); } else if (index === this.collection.length - 1) {