[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:
@@ -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 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user