Commit 6cd9d2e8 authored by JC Brand's avatar JC Brand

Rename `_tearDown` to `tearDown` and rebuild

parent 2cdd46f6
...@@ -62089,13 +62089,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -62089,13 +62089,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
// Overrides mentioned here will be picked up by converse.js's // Overrides mentioned here will be picked up by converse.js's
// plugin architecture they will replace existing methods on the // plugin architecture they will replace existing methods on the
// relevant objects or classes. // relevant objects or classes.
disconnect: function disconnect() {
const _converse = this.__super__._converse;
_converse.chatboxviews.closeAllChatBoxes();
return this.__super__.disconnect.apply(this, arguments);
},
initStatus: function initStatus(reconnecting) { initStatus: function initStatus(reconnecting) {
const _converse = this.__super__._converse; const _converse = this.__super__._converse;
...@@ -62966,7 +62959,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -62966,7 +62959,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.emit('chatBoxesInitialized'); _converse.emit('chatBoxesInitialized');
}); });
_converse.api.listen.on('logout', () => { _converse.api.listen.on('clearSession', () => {
_converse.chatboxviews.closeAllChatBoxes(); _converse.chatboxviews.closeAllChatBoxes();
}); });
...@@ -64358,8 +64351,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -64358,8 +64351,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
// relevant objects or classes. // relevant objects or classes.
// //
// New functions which don't exist yet can also be added. // New functions which don't exist yet can also be added.
_tearDown() { tearDown() {
this.__super__._tearDown.apply(this, arguments); this.__super__.tearDown.apply(this, arguments);
if (this.rosterview) { if (this.rosterview) {
// Removes roster groups // Removes roster groups
...@@ -65225,7 +65218,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -65225,7 +65218,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.stopListening(); _converse.stopListening();
_converse._tearDown(); _converse.tearDown();
} }
if ('onpagehide' in window) { if ('onpagehide' in window) {
...@@ -65408,7 +65401,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -65408,7 +65401,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.connection.reconnecting = true; _converse.connection.reconnecting = true;
_converse._tearDown(); _converse.tearDown();
_converse.logIn(null, true); _converse.logIn(null, true);
}, 3000, { }, 3000, {
...@@ -65422,7 +65415,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -65422,7 +65415,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.connection.reset(); _converse.connection.reset();
_converse._tearDown(); _converse.tearDown();
_converse.emit('disconnected'); _converse.emit('disconnected');
}; };
...@@ -65614,7 +65607,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -65614,7 +65607,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
if (!_.isUndefined(_converse.connection)) { if (!_.isUndefined(_converse.connection)) {
_converse.connection.disconnect(); _converse.connection.disconnect();
} else { } else {
_converse._tearDown(); _converse.tearDown();
} // Recreate all the promises } // Recreate all the promises
...@@ -66061,7 +66054,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -66061,7 +66054,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.emit('connectionInitialized'); _converse.emit('connectionInitialized');
}; };
this._tearDown = function () { this.tearDown = function () {
/* Remove those views which are only allowed with a valid /* Remove those views which are only allowed with a valid
* connection. * connection.
*/ */
...@@ -71213,7 +71206,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -71213,7 +71206,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
// relevant objects or classes. // relevant objects or classes.
// //
// New functions which don't exist yet can also be added. // New functions which don't exist yet can also be added.
_tearDown() { tearDown() {
const rooms = this.chatboxes.where({ const rooms = this.chatboxes.where({
'type': converse.CHATROOMS_TYPE 'type': converse.CHATROOMS_TYPE
}); });
...@@ -71224,7 +71217,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -71224,7 +71217,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}); });
}); });
this.__super__._tearDown.call(this, arguments); this.__super__.tearDown.call(this, arguments);
}, },
ChatBoxes: { ChatBoxes: {
...@@ -75525,11 +75518,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75525,11 +75518,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.__super__.afterReconnected.apply(this, arguments); this.__super__.afterReconnected.apply(this, arguments);
}, },
_tearDown() { tearDown() {
/* Remove the rosterview when tearing down. It gets created /* Remove the rosterview when tearing down. It gets created
* anew when reconnecting or logging in. * anew when reconnecting or logging in.
*/ */
this.__super__._tearDown.apply(this, arguments); this.__super__.tearDown.apply(this, arguments);
if (!_.isUndefined(this.rosterview)) { if (!_.isUndefined(this.rosterview)) {
this.rosterview.remove(); this.rosterview.remove();
...@@ -76851,7 +76844,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76851,7 +76844,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.vcards.fetch(); _converse.vcards.fetch();
}; };
_converse.api.listen.on('connectionInitialized', _converse.initVCardCollection); _converse.api.listen.on('sessionInitialized', _converse.initVCardCollection);
_converse.on('addClientFeatures', () => { _converse.on('addClientFeatures', () => {
_converse.api.disco.own.features.add(Strophe.NS.VCARD); _converse.api.disco.own.features.add(Strophe.NS.VCARD);
...@@ -91,8 +91,8 @@ ...@@ -91,8 +91,8 @@
// //
// New functions which don't exist yet can also be added. // New functions which don't exist yet can also be added.
_tearDown () { tearDown () {
this.__super__._tearDown.apply(this, arguments); this.__super__.tearDown.apply(this, arguments);
if (this.rosterview) { if (this.rosterview) {
// Removes roster groups // Removes roster groups
this.rosterview.model.off().reset(); this.rosterview.model.off().reset();
......
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
_converse.connection.reset(); _converse.connection.reset();
_converse.off(); _converse.off();
_converse.stopListening(); _converse.stopListening();
_converse._tearDown(); _converse.tearDown();
} }
if ('onpagehide' in window) { if ('onpagehide' in window) {
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
__('The connection has dropped, attempting to reconnect.') __('The connection has dropped, attempting to reconnect.')
); );
_converse.connection.reconnecting = true; _converse.connection.reconnecting = true;
_converse._tearDown(); _converse.tearDown();
_converse.logIn(null, true); _converse.logIn(null, true);
}, 3000, {'leading': true}); }, 3000, {'leading': true});
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
_converse.log('DISCONNECTED'); _converse.log('DISCONNECTED');
delete _converse.connection.reconnecting; delete _converse.connection.reconnecting;
_converse.connection.reset(); _converse.connection.reset();
_converse._tearDown(); _converse.tearDown();
_converse.emit('disconnected'); _converse.emit('disconnected');
}; };
...@@ -656,7 +656,7 @@ ...@@ -656,7 +656,7 @@
if (!_.isUndefined(_converse.connection)) { if (!_.isUndefined(_converse.connection)) {
_converse.connection.disconnect(); _converse.connection.disconnect();
} else { } else {
_converse._tearDown(); _converse.tearDown();
} }
// Recreate all the promises // Recreate all the promises
_.each(_.keys(_converse.promises), addPromise); _.each(_.keys(_converse.promises), addPromise);
...@@ -1075,7 +1075,7 @@ ...@@ -1075,7 +1075,7 @@
}; };
this._tearDown = function () { this.tearDown = function () {
/* Remove those views which are only allowed with a valid /* Remove those views which are only allowed with a valid
* connection. * connection.
*/ */
......
...@@ -76,12 +76,12 @@ ...@@ -76,12 +76,12 @@
// //
// New functions which don't exist yet can also be added. // New functions which don't exist yet can also be added.
_tearDown () { tearDown () {
const rooms = this.chatboxes.where({'type': converse.CHATROOMS_TYPE}); const rooms = this.chatboxes.where({'type': converse.CHATROOMS_TYPE});
_.each(rooms, function (room) { _.each(rooms, function (room) {
u.safeSave(room, {'connection_status': converse.ROOMSTATUS.DISCONNECTED}); u.safeSave(room, {'connection_status': converse.ROOMSTATUS.DISCONNECTED});
}); });
this.__super__._tearDown.call(this, arguments); this.__super__.tearDown.call(this, arguments);
}, },
ChatBoxes: { ChatBoxes: {
......
...@@ -49,11 +49,11 @@ ...@@ -49,11 +49,11 @@
this.__super__.afterReconnected.apply(this, arguments); this.__super__.afterReconnected.apply(this, arguments);
}, },
_tearDown () { tearDown () {
/* Remove the rosterview when tearing down. It gets created /* Remove the rosterview when tearing down. It gets created
* anew when reconnecting or logging in. * anew when reconnecting or logging in.
*/ */
this.__super__._tearDown.apply(this, arguments); this.__super__.tearDown.apply(this, arguments);
if (!_.isUndefined(this.rosterview)) { if (!_.isUndefined(this.rosterview)) {
this.rosterview.remove(); this.rosterview.remove();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment