From b94d574b24815d7a0f8c9843a3372082ac989083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 20 Dec 2018 15:24:39 +0100 Subject: [PATCH] MOBILE-2795 message: Fix context menu icons --- src/addon/messages/pages/discussion/discussion.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/addon/messages/pages/discussion/discussion.ts b/src/addon/messages/pages/discussion/discussion.ts index df944af81..3d1a6d161 100644 --- a/src/addon/messages/pages/discussion/discussion.ts +++ b/src/addon/messages/pages/discussion/discussion.ts @@ -229,6 +229,8 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.conversationImage = member.profileimageurl; this.title = member.fullname; } + this.blockIcon = this.otherMember && this.otherMember.isblocked ? 'close-circle' : 'checkmark-circle'; + this.addRemoveIcon = this.otherMember && this.otherMember.iscontact ? 'remove' : 'add'; })); } else { this.otherMember = null; @@ -403,7 +405,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { return this.messagesProvider.invalidateConversation(conversationId).catch(() => { // Ignore errors. }).then(() => { - return this.messagesProvider.getConversation(conversationId); + return this.messagesProvider.getConversation(conversationId, undefined, true); }).catch((error) => { // Get conversation failed, use the fallback one if we have it. if (fallbackConversation) { @@ -422,8 +424,6 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.favouriteIcon = conversation.isfavourite ? 'fa-star-o' : 'fa-star'; if (!this.isGroup) { this.userId = conversation.userid; - this.blockIcon = this.otherMember && this.otherMember.isblocked ? 'close-circle' : 'checkmark-circle'; - this.addRemoveIcon = this.otherMember && this.otherMember.iscontact ? 'remove' : 'add'; } return true; @@ -1022,7 +1022,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.conversation.isfavourite = !this.conversation.isfavourite; // Get the conversation data so it's cached. Don't block the user for this. - this.messagesProvider.getConversation(this.conversation.id); + this.messagesProvider.getConversation(this.conversation.id, undefined, true); this.eventsProvider.trigger(AddonMessagesProvider.UPDATE_CONVERSATION_LIST_EVENT, { conversationId: this.conversation.id,