[REM] mail: remove auto read in channels
Currently using channels and inbox notifications is impossible because browsing a channel marks all related notifications as done. If an user has a lot of pending notifications, he cannot go on a channel linked to documents he is working on. Indeed in that case he looses all notifications. Auto-read of notifications is therefore removed. The only way of managing notifications when working by inbox is either in the inbox menu or either on documents, as reading a document marks related notification as done.
This commit is contained in:
@@ -111,14 +111,6 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
|
||||
var channel_id = $(event.target).data("channel-id");
|
||||
chat_manager.unsubscribe(chat_manager.get_channel(channel_id));
|
||||
},
|
||||
"click .o_snackbar_undo": function (event) {
|
||||
event.preventDefault();
|
||||
var channel = this.channel;
|
||||
this.$snackbar.remove();
|
||||
this.clear_needactions_def.then(function (msgs_ids) {
|
||||
chat_manager.undo_mark_as_read(msgs_ids, channel);
|
||||
});
|
||||
},
|
||||
"click .o_mail_annoying_notification_bar .fa-close": function () {
|
||||
this.$(".o_mail_annoying_notification_bar").slideUp();
|
||||
},
|
||||
@@ -425,7 +417,6 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
|
||||
this.messages_separator_position = undefined; // reset value on channel change
|
||||
this.unread_counter = this.channel.unread_counter;
|
||||
this.last_seen_message_id = this.channel.last_seen_message_id;
|
||||
this.clear_needactions_def = $.Deferred();
|
||||
if (this.$snackbar) {
|
||||
this.$snackbar.remove();
|
||||
}
|
||||
@@ -436,14 +427,7 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
|
||||
return this.fetch_and_render_thread().then(function () {
|
||||
// Mark channel's messages as read and clear needactions
|
||||
if (channel.type !== 'static') {
|
||||
// Display snackbar if needactions have been cleared
|
||||
if (channel.needaction_counter > 0) {
|
||||
self.render_snackbar('mail.chat.UndoSnackbar', {
|
||||
nb_needactions: channel.needaction_counter,
|
||||
});
|
||||
}
|
||||
chat_manager.mark_channel_as_seen(channel);
|
||||
self.clear_needactions_def = chat_manager.mark_all_as_read(channel);
|
||||
}
|
||||
|
||||
// Update control panel
|
||||
|
||||
@@ -167,10 +167,6 @@
|
||||
cursor: pointer;
|
||||
background-color: darken(@gray, 8%);
|
||||
color: white;
|
||||
.o_snackbar_undo {
|
||||
margin-left: 8px;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,13 +113,6 @@
|
||||
<i t-if="status == 'offline'" class="o_mail_user_status fa fa-circle-o" title="Offline"/>
|
||||
</t>
|
||||
|
||||
<t t-name="mail.chat.UndoSnackbar">
|
||||
<div class="alert o_mail_snackbar" data-dismiss="alert" role="alert">
|
||||
<t t-esc="nb_needactions"/> mention(s) marked as read.
|
||||
<a href="#" class="alert-link o_snackbar_undo">Undo</a>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="mail.chat.MessageSentSnackbar">
|
||||
<div class="alert o_mail_snackbar" data-dismiss="alert" role="alert">
|
||||
Message sent in "<t t-esc="record_name"/>".
|
||||
|
||||
Reference in New Issue
Block a user