diff --git a/addons/mail/static/src/js/client_action.js b/addons/mail/static/src/js/client_action.js index 822f87dc0a2..82a68e52eb9 100644 --- a/addons/mail/static/src/js/client_action.js +++ b/addons/mail/static/src/js/client_action.js @@ -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 diff --git a/addons/mail/static/src/less/client_action.less b/addons/mail/static/src/less/client_action.less index eb91fd78fb3..53ac45d8d3f 100644 --- a/addons/mail/static/src/less/client_action.less +++ b/addons/mail/static/src/less/client_action.less @@ -167,10 +167,6 @@ cursor: pointer; background-color: darken(@gray, 8%); color: white; - .o_snackbar_undo { - margin-left: 8px; - padding: 8px; - } } } } diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/client_action.xml index b6701a45cb7..ff2122256cc 100644 --- a/addons/mail/static/src/xml/client_action.xml +++ b/addons/mail/static/src/xml/client_action.xml @@ -113,13 +113,6 @@ - - - -