From 33c2d4614f7727481a3be06b6bc8287c2cdc98c5 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 29 Aug 2018 10:20:45 +0200 Subject: [PATCH] Remove unused method --- src/converse-chatboxes.js | 10 +--------- src/converse-chatview.js | 6 +++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/converse-chatboxes.js b/src/converse-chatboxes.js index 4079b3e10..936131b65 100644 --- a/src/converse-chatboxes.js +++ b/src/converse-chatboxes.js @@ -846,11 +846,6 @@ } }); - // TODO: move to converse-chatboxviews.js and use there in the API - _converse.getViewForChatBox = function (chatbox) { - if (!chatbox) { return; } - return _converse.chatboxviews.get(chatbox.get('id')); - }; function autoJoinChats () { /* Automatically join private chats, based on the @@ -903,10 +898,7 @@ _converse.emit('chatBoxesInitialized'); }); - _converse.api.listen.on('clearSession', () => { - _converse.chatboxviews.closeAllChatBoxes(); - }); - + _converse.api.listen.on('clearSession', () => _converse.chatboxviews.closeAllChatBoxes()); _converse.api.listen.on('presencesInitialized', () => _converse.chatboxes.onConnected()); /************************ END Event Handlers ************************/ diff --git a/src/converse-chatview.js b/src/converse-chatview.js index 6b5899404..e7e97ea76 100644 --- a/src/converse-chatview.js +++ b/src/converse-chatview.js @@ -90,13 +90,12 @@ function onWindowStateChanged (data) { if (_converse.chatboxviews) { - _converse.chatboxviews.each(chatboxview => { - chatboxview.onWindowStateChanged(data.state); - }); + _converse.chatboxviews.each(view => view.onWindowStateChanged(data.state)); } } _converse.api.listen.on('windowStateChanged', onWindowStateChanged); + _converse.EmojiPicker = Backbone.Model.extend({ defaults: { 'current_category': 'people', @@ -105,6 +104,7 @@ } }); + _converse.EmojiPickerView = Backbone.VDOMView.extend({ className: 'emoji-picker-container', events: {