From 949cb8d8e3fc28cf3c2ba78d9920d8ac15b0e160 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 7 Sep 2015 17:25:10 -0700 Subject: [PATCH] Use generic Backbone collection for inbox There's no need to use a custom collection type here since we don't use any of the ConversationCollection methods. This helps prevent the introduction of duplicate models for the same chat. // FREEBIE --- js/panel_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/panel_controller.js b/js/panel_controller.js index f0d37301c8..a89564d417 100644 --- a/js/panel_controller.js +++ b/js/panel_controller.js @@ -11,7 +11,7 @@ var conversations = new Whisper.ConversationCollection(); - window.inbox = new Whisper.ConversationCollection([], { + window.inbox = new Backbone.Collection([], { comparator: function(model) { return -model.get('active_at'); }