diff --git a/addons/mail/static/src/js/services/mail_manager.js b/addons/mail/static/src/js/services/mail_manager.js index 64e733abf43..6a2fe69581d 100644 --- a/addons/mail/static/src/js/services/mail_manager.js +++ b/addons/mail/static/src/js/services/mail_manager.js @@ -903,11 +903,6 @@ var MailManager = AbstractService.extend({ args: [[channelID]], }) .then(function (result) { - // Prevent to automatically open chat window when a new message - // is received on mobile. - if (config.device.isMobile) { - options.silent = true; - } return self._addChannel(result, options); }); }, @@ -1235,11 +1230,6 @@ var MailManager = AbstractService.extend({ var proms = []; const options = {}; - // Prevent to automatically open all chat windows at initial loading. - if (config.device.isMobile) { - options.silent = true; - } - _.each(data.channel_slots, function (channels) { _.each(channels, function (channel) { proms.push(self._addChannel(channel, options)); diff --git a/addons/mail/static/src/js/services/mail_window_manager.js b/addons/mail/static/src/js/services/mail_window_manager.js index 57b7623e05a..9cbb77e529d 100644 --- a/addons/mail/static/src/js/services/mail_window_manager.js +++ b/addons/mail/static/src/js/services/mail_window_manager.js @@ -658,11 +658,13 @@ MailManager.include({ */ _onNewChannel: function (channel, proms) { if (channel.isDetached()) { - var prom = this.openThreadWindow(channel.getID(), { - keepFoldState: true, - passively: true, - }); - proms.push(prom); + if (!config.device.isMobile) { + var prom = this.openThreadWindow(channel.getID(), { + keepFoldState: true, + passively: true, + }); + proms.push(prom); + } } else { this._closeThreadWindow(channel.getID()); }