diff --git a/src/pages/profile/profile-menu.ts b/src/pages/profile/profile-menu.ts index a8cd5b7..3abd9d6 100644 --- a/src/pages/profile/profile-menu.ts +++ b/src/pages/profile/profile-menu.ts @@ -17,11 +17,15 @@ export class ProfileMenu { private userid: string; private username: string; + private you_muted: boolean; + private you_blocked: boolean; constructor(public navParams: NavParams, public viewCtrl: ViewController, public toastCtrl: ToastController, public events: Events) { this.userid = this.navParams.data.userid; this.username = this.navParams.data.username; + this.you_muted = this.navParams.data.you_muted; + this.you_blocked = this.navParams.data.you_blocked; } browse() { @@ -30,7 +34,7 @@ export class ProfileMenu { } mute() { - if (this.user.you_muted) { + if (this.you_muted) { pnut.unmute(this.userid).then(res => { this.presentToast('User unmuted'); }); @@ -43,7 +47,7 @@ export class ProfileMenu { } block() { - if (this.user.you_blocked) { + if (this.you_blocked) { pnut.unblock(this.userid).then(res => { this.presentToast('User unblocked'); }); diff --git a/src/pages/profile/profile.ts b/src/pages/profile/profile.ts index e0d4b61..057eb23 100644 --- a/src/pages/profile/profile.ts +++ b/src/pages/profile/profile.ts @@ -131,7 +131,9 @@ export class ProfilePage { presentProfileMenu(myEvent) { let popover = this.popoverCtrl.create(ProfileMenu, { userid: this.user.id, - username: this.user.username}); + username: this.user.username, + you_muted: this.user.you_muted, + you_blocked: this.user.you_blocked}); popover.present({ev: myEvent}); }