[FIX] mail: no crash when click on failure in mobile

Before this commit, when clicking on a mail failure in
the messaging menu in mobile, it crashed.

`NotificationGroupView` is already destroyed, so it crashed
due to attempting to access a field (`messaging`)

Task-3013202

closes odoo/odoo#102986

X-original-commit: 73b94715f0d0086d361937491c27c611a03a9f67
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Alexandre Kühn
2022-10-11 13:16:14 +02:00
parent c4febbbe3a
commit 6650188d2c
@@ -19,9 +19,10 @@ registerModel({
// handled in `_onClickMarkAsRead`
return;
}
const messaging = this.messaging;
this.notificationGroup.openDocuments();
if (!this.messaging.device.isSmall) {
this.messaging.messagingMenu.close();
if (!messaging.device.isSmall) {
messaging.messagingMenu.close();
}
},
/**