[FIX] mail: chat window positioning with discuss open

Before this commit, the process of positioning chat windows
could fail if one of the tabs had discuss open.

When a chat window was hidden and become visible, the algorithm
was not updating the state of the chat window to "visible" when
discuss was open. As a result, it was always trying to make it
visible, resulting in an infinite loop and raising the following
error message:

`Uncaught RangeError: Maximum call stack size exceeded`

This commit ensures it works even when discuss is open.

opw-1919327

closes odoo/odoo#30137
This commit is contained in:
Alexandre Kühn
2019-01-11 11:03:45 +00:00
parent 2ce4ccd086
commit 295a654283
@@ -532,9 +532,6 @@ MailManager.include({
* @private
*/
_repositionThreadWindows: function () {
if (this._areAllThreadWindowsHidden()) {
return;
}
this._computeAvailableSlotsForThreadWindows();
this._repositionVisibleThreadWindows();
@@ -576,9 +573,6 @@ MailManager.include({
* the focus is on the thread window.
*/
_updateThreadWindowsFromMessage: function (message, options) {
if (this._areAllThreadWindowsHidden()) {
return;
}
_.each(this._threadWindows, function (threadWindow) {
if (_.contains(message.getThreadIDs(), threadWindow.getID())) {
threadWindow.update(options);