From bd81a98ffa3d995e62dd6e871606b55cdd426d86 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 6 Dec 2016 11:06:21 +0000 Subject: [PATCH] converse-rosterview: Remove the rosterview when tearing down. It gets created anew when reconnecting or logging in. --- src/converse-rosterview.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/converse-rosterview.js b/src/converse-rosterview.js index 93a7e152a..9157940af 100644 --- a/src/converse-rosterview.js +++ b/src/converse-rosterview.js @@ -52,6 +52,16 @@ this.__super__.afterReconnected.apply(this, arguments); }, + _tearDown: function () { + /* Remove the rosterview when tearing down. It gets created + * anew when reconnecting or logging in. + */ + this.__super__._tearDown.apply(this, arguments); + if (!_.isUndefined(this.rosterview)) { + this.rosterview.remove(); + } + }, + RosterGroups: { comparator: function () { // RosterGroupsComparator only gets set later (once i18n is