summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/user/user.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-08-10 10:39:36 +0000
committerSébastien Theys <seb@odoo.com>2020-08-21 14:16:33 +0000
commit79f6b15c747a7ce9bf3d3415c569feda4da85323 (patch)
tree1ad8fbe037963cf40d52db5fbe0ad6aaa8646410 /addons/mail/static/src/models/user/user.js
parent01aa711d413040af5edc9cb872e72a500cfa641d (diff)
[FIX] mail: avoid unnecessary update of inverse in JS models
Part of task-2308312 X-original-commit: 0e08e43decf18108d25d051ad76c093bcdf434db
Diffstat (limited to 'addons/mail/static/src/models/user/user.js')
-rw-r--r--addons/mail/static/src/models/user/user.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/static/src/models/user/user.js b/addons/mail/static/src/models/user/user.js
index 20495e25aa1..b9bc72bf987 100644
--- a/addons/mail/static/src/models/user/user.js
+++ b/addons/mail/static/src/models/user/user.js
@@ -11,13 +11,13 @@ function factory(dependencies) {
/**
* @override
*/
- delete() {
+ _willDelete() {
if (this.env.messaging) {
if (this === this.env.messaging.currentUser) {
- this.env.messaging.update({ currentUser: [['unlink-all']] });
+ this.env.messaging.update({ currentUser: [['unlink']] });
}
}
- super.delete();
+ return super._willDelete(...arguments);
}
//----------------------------------------------------------------------