summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/chat_manager.js
diff options
context:
space:
mode:
authorDharmang Soni <dpr@odoo.com>2017-04-26 10:51:15 +0530
committerAaron Bohy <aab@odoo.com>2017-09-15 15:25:06 +0200
commit4685e4bc7f19f964697bf0dbd7dfdf254b6c5628 (patch)
treeb852d056ac124aa692dff20f468dd62add05b00e /addons/mail/static/src/js/chat_manager.js
parenta8e7d096b85709ccf52411c450d0574f9238fd6f (diff)
[IMP] mail: improve Discuss UI for mobile devices
- Brand new UI for Discuss client action (with tabs for Inbox, chats, channels...) - In mobile, conversations always open in Chat Windows - Chat window UI improved (both mobile and desktop) - Channels preview (used in the systray menu, and now in the mobile UI of Discuss) improved - Other minor less tweaks
Diffstat (limited to 'addons/mail/static/src/js/chat_manager.js')
-rw-r--r--addons/mail/static/src/js/chat_manager.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js
index 807d5352180..128309bc77d 100644
--- a/addons/mail/static/src/js/chat_manager.js
+++ b/addons/mail/static/src/js/chat_manager.js
@@ -82,6 +82,8 @@ function add_message (data, options) {
_.each(msg.channel_ids, function (channel_id) {
var channel = chat_manager.get_channel(channel_id);
if (channel) {
+ // For mobile tabs view, we show recent message for channel.
+ channel.last_message = msg;
add_to_cache(msg, []);
if (options.domain && options.domain !== []) {
add_to_cache(msg, options.domain);
@@ -288,6 +290,7 @@ function make_channel (data, options) {
group_based_subscription: data.group_based_subscription,
needaction_counter: data.message_needaction_counter || 0,
unread_counter: 0,
+ last_message: data.last_message,
last_seen_message_id: data.seen_message_id,
cache: {'[]': {
all_history_loaded: false,