diff options
| author | Julien Giannone <jgi@odoo.com> | 2021-01-15 10:32:52 +0000 |
|---|---|---|
| committer | Julien Giannone <jgi@odoo.com> | 2021-02-12 10:08:57 +0000 |
| commit | a257e0ede12ead06c0f8dba90c3868761da6ea71 (patch) | |
| tree | 9a85656d593e6c152b66c284d0e2d04ba908e42e /addons/mail/static/src/models/messaging_notification_handler | |
| parent | 016dedf172f750a0fcb1138a798faf2a224d513e (diff) | |
[FIX] mail: (mobile) Prevent server sync for open/close state
This commit prevents the opening/closure of a channel on mobile when
the action is performed on desktop and reciprocally
closes odoo/odoo#64599
Tasks-id: 2267593
Related: odoo/enterprise#16296
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/messaging_notification_handler')
| -rw-r--r-- | addons/mail/static/src/models/messaging_notification_handler/messaging_notification_handler.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/static/src/models/messaging_notification_handler/messaging_notification_handler.js b/addons/mail/static/src/models/messaging_notification_handler/messaging_notification_handler.js index a63acfb82fe..5457ed989ff 100644 --- a/addons/mail/static/src/models/messaging_notification_handler/messaging_notification_handler.js +++ b/addons/mail/static/src/models/messaging_notification_handler/messaging_notification_handler.js @@ -267,7 +267,7 @@ function factory(dependencies) { channel.markAsFetched(); } // (re)open chat on receiving new message - if (channel.channel_type !== 'channel') { + if (channel.channel_type !== 'channel' && !this.env.messaging.device.isMobile) { this.env.messaging.chatWindowManager.openThread(channel); } } @@ -708,7 +708,7 @@ function factory(dependencies) { const chat = await this.async(() => this.env.messaging.getChat({ partnerId: partner_id } )); - if (!chat) { + if (!chat || this.env.messaging.device.isMobile) { return; } this.env.messaging.chatWindowManager.openThread(chat); |
