diff --git a/addons/mail/static/src/js/discuss_mobile.js b/addons/mail/static/src/js/discuss_mobile.js index 556651ec67e..531553e6804 100644 --- a/addons/mail/static/src/js/discuss_mobile.js +++ b/addons/mail/static/src/js/discuss_mobile.js @@ -14,7 +14,6 @@ if (!config.device.isMobile) { Discuss.include({ template: 'mail.discuss_mobile', - need_control_panel: false, // in mobile, we use a custom control panel events: _.extend(Discuss.prototype.events, { 'click .o_mail_mobile_tab': '_onMobileTabClicked', 'click .o_channel_inbox_item': '_onMobileInboxButtonClicked', @@ -122,14 +121,6 @@ Discuss.include({ this._super.apply(this, arguments); } }, - /** - * @private - */ - _toggleSearchView: function () { - this.searchviewDisplayed = !this.searchviewDisplayed; - this.searchview.$el.toggleClass('o_hidden', !this.searchviewDisplayed); - this.$buttons.toggleClass('o_hidden', this.searchviewDisplayed); - }, /** * Overrides to toggle the visibility of the tabs when a message is unselected * @@ -198,10 +189,6 @@ Discuss.include({ self.$buttons.find('.o_mail_chat_button_' + type).removeClass('o_hidden'); self.$buttons.find('.o_mail_chat_button_mark_read').toggleClass('o_hidden', type !== 'channel_inbox'); self.$buttons.find('.o_mail_chat_button_unstar_all').toggleClass('o_hidden', type !== 'channel_starred'); - self.$('.o_enable_searchview').toggleClass('o_hidden', !inInbox); - if (!inInbox && self.searchviewDisplayed) { - self._toggleSearchView(); // close the searchview when leaving Inbox - } // update Inbox page buttons if (inInbox) { @@ -219,17 +206,6 @@ Discuss.include({ self.$('.o_mail_mobile_tab[data-type=' + type + ']').addClass('active'); }); }, - /** - * @override - */ - _updateControlPanel: function () { - this.$buttons.appendTo(this.$('.o_mail_chat_mobile_control_panel')); - this.searchview.$el.appendTo(this.$('.o_mail_chat_mobile_control_panel')); - var $enable_searchview = $('