From b01b939d151a6be9cf503f3ce6030c34e4e32eb4 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 7 Mar 2018 17:27:58 -0800 Subject: [PATCH] Clear conversation list when the conversations collection resets --- js/conversation_controller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/conversation_controller.js b/js/conversation_controller.js index 05620cd75..54719049b 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -15,6 +15,9 @@ this.on('change:timestamp change:name change:number', this.sort); this.listenTo(conversations, 'add change:active_at', this.addActive); + this.listenTo(conversations, 'reset', function() { + this.reset([]); + }); this.on('add remove change:unreadCount', _.debounce(this.updateUnreadCount.bind(this), 1000)