[FIX] mail: prevent messaging menu from hiding home menu in mobile

task-2330277

closes odoo/odoo#63405

X-original-commit: db7f4437a644b93a5227f663fa19dda00817c13c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sébastien Theys
2020-12-15 14:33:23 +00:00
parent 9e1849d183
commit bd7aeae189
3 changed files with 8 additions and 11 deletions
@@ -111,12 +111,6 @@ class MessagingMenu extends Component {
*/
return;
}
// in mobile: keeps the messaging menu open in background
// TODO: maybe need to move this to a mobile component?
// task-2089887
if (this.env.messaging.device.isMobile) {
return;
}
// ignore click inside the menu
if (this.el.contains(ev.target)) {
return;
@@ -50,6 +50,13 @@ function factory(dependencies) {
if (thread && notifyServer) {
thread.notifyFoldStateToServer('closed');
}
if (this.env.device.isMobile && !this.env.messaging.discuss.isOpen) {
// If we are in mobile and discuss is not open, it means the
// chat window was opened from the messaging menu. In that
// case it should be re-opened to simulate it was always
// there in the background.
this.env.messaging.messagingMenu.update({ isOpen: true });
}
}
expand() {
@@ -16,11 +16,7 @@ function factory(dependencies) {
* Close the messaging menu. Should reset its internal state.
*/
close() {
this.update({
activeTabId: 'all',
isMobileNewMessageToggled: false,
isOpen: false,
});
this.update({ isOpen: false });
}
/**