[FIX] mail: avoid fetching messages when updating ui

Every time the user updates a message, the js code triggered a rpc to
refetch messages in the current channel.  This is useless, since the new
messages have been fetched anyway by the bus.
This commit is contained in:
Géry Debongnie
2015-11-04 16:31:44 +01:00
committed by Aaron Bohy
parent ff84737054
commit 8ef69bd9fb
+1 -1
View File
@@ -486,7 +486,7 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
var current_channel_id = this.channel.id;
if ((current_channel_id === "channel_starred" && !message.is_starred) ||
(current_channel_id === "channel_inbox" && !message.is_needaction)) {
chat_manager.fetch(this.channel, this.domain).then(function (messages) {
chat_manager.get_messages({channel_id: this.channel.id, domain: this.domain}).then(function (messages) {
var options = self.get_thread_rendering_options();
self.thread.remove_message_and_render(message.id, messages, options);
});