diff options
| author | Géry Debongnie <ged@odoo.com> | 2015-11-04 14:58:13 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-11-04 16:31:44 +0100 |
| commit | 8cd75e630a79999b06f3c7a7c78c39f906b3bc10 (patch) | |
| tree | 73bac8da8b8da75dba59a8ccca4e7b70698d50bd /addons/mail/static/src | |
| parent | 62829ac36443a7383a5875e85808307331fbd99e (diff) | |
[FIX] mail: sort messages by id instead of date, clientside
sorting by date was not sufficient, some messages had exactly the same
date, which had some subtle issues in the client interface.
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/chat_manager.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index c0b3fd00536..7fd42ef417c 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -35,7 +35,7 @@ function add_message (data, options) { if (!msg) { msg = make_message(data); // Keep the array ordered by date when inserting the new message - messages.splice(_.sortedIndex(messages, msg, 'date'), 0, msg); + messages.splice(_.sortedIndex(messages, msg, 'id'), 0, msg); if (options.channel_id) { var channel = _.findWhere(channels, {id: options.channel_id}); if (channel.hidden) { |
