MOBILE-3320 messages: swap block/unblock icons

main
Noel De Martin 2021-06-03 11:27:24 +02:00
parent c1930a39ff
commit f6415990b7
1 changed files with 4 additions and 4 deletions

View File

@ -288,7 +288,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
this.conversationImage = this.otherMember.profileimageurl; this.conversationImage = this.otherMember.profileimageurl;
this.title = this.otherMember.fullname; this.title = this.otherMember.fullname;
} }
this.blockIcon = this.otherMember.isblocked ? 'fas-user-lock' : 'fas-user-check'; this.blockIcon = this.otherMember.isblocked ? 'fas-user-check' : 'fas-user-lock';
return; return;
})); }));
@ -317,7 +317,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
}; };
this.otherMember.isblocked = await AddonMessages.isBlocked(this.userId!); this.otherMember.isblocked = await AddonMessages.isBlocked(this.userId!);
this.otherMember.iscontact = await AddonMessages.isContact(this.userId!); this.otherMember.iscontact = await AddonMessages.isContact(this.userId!);
this.blockIcon = this.otherMember.isblocked ? 'fas-user-lock' : 'fas-user-check'; this.blockIcon = this.otherMember.isblocked ? 'fas-user-check' : 'fas-user-lock';
return; return;
})); }));
@ -1466,7 +1466,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
} catch (error) { } catch (error) {
CoreDomUtils.showErrorModalDefault(error, 'core.error', true); CoreDomUtils.showErrorModalDefault(error, 'core.error', true);
} finally { } finally {
this.blockIcon = this.otherMember.isblocked ? 'fas-user-lock' : 'fas-user-check'; this.blockIcon = this.otherMember.isblocked ? 'fas-user-check' : 'fas-user-lock';
} }
} catch { } catch {
// User cancelled. // User cancelled.
@ -1548,7 +1548,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
} catch (error) { } catch (error) {
CoreDomUtils.showErrorModalDefault(error, 'core.error', true); CoreDomUtils.showErrorModalDefault(error, 'core.error', true);
} finally { } finally {
this.blockIcon = this.otherMember.isblocked ? 'fas-user-lock' : 'fas-user-check'; this.blockIcon = this.otherMember.isblocked ? 'fas-user-check' : 'fas-user-lock';
} }
} catch { } catch {
// User cancelled. // User cancelled.