summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-09-23 10:50:45 +0000
committerSébastien Theys <seb@odoo.com>2020-09-23 17:08:02 +0000
commitdb208c76f7de734fdcaf977412137bd9ea0d82ac (patch)
tree7f03fbbabef9abfc043e91c69ed4f640c0d90cae /addons/web/static/src/js
parentb9d4ccfc8db1f3425b8ee0e8d6311ebaac0f26b2 (diff)
[FIX] mail: prevent unnecessary fold state RPC
When the pending value is the same as the current server value, the pending value should be ignored and no RPC should be done. In particular this prevents a non-main tab from calling the RPC when receiving a bus notification that would lead to closing a chat window, which in turn used to call the close RPC again before this commit. This led to inconsistencies especially on the main tab, if the chat window was requested to be open again after the initial close, but before the "secondary" close, it would end up closing instead of opening. The current commit reduces the issue and prevents as many unnecessary RPC as there are tabs open, which is a good improvement. But it does not negate it completely. Indeed, when quickly closing then opening the same chat window, it might still happen for network reasons that the RPC or the corresponding bus notifications are received in the wrong order. This is less frequent both functionally (to click so fast) and technically (to have the network that slow) at the same time, so it is considering acceptable / out of scope. The opportunity is taken to clean up the code by removing unnecessary fields and making use of compute and flux specific RPC instead of `_updateAfter`. task-2273658 task-2329521 closes odoo/odoo#58367 X-original-commit: cbb1d855c7af5f78819db3cd476dbe0f985bc214 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions