From 30e9fdc2d9280d2078598446135e20957be0dc62 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Fri, 5 Jul 2019 17:22:33 -0400 Subject: [PATCH] fix create new status mention bug --- .../create-status/create-status.component.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/components/create-status/create-status.component.ts b/src/app/components/create-status/create-status.component.ts index e65fb2be..1959e206 100644 --- a/src/app/components/create-status/create-status.component.ts +++ b/src/app/components/create-status/create-status.component.ts @@ -51,8 +51,10 @@ export class CreateStatusComponent implements OnInit, OnDestroy { private _isDirectMention: boolean; @Input('isDirectMention') set isDirectMention(value: boolean) { - this._isDirectMention = value; - this.initMention(); + if (value) { + this._isDirectMention = value; + this.initMention(); + } } get isDirectMention(): boolean { return this._isDirectMention; @@ -61,8 +63,10 @@ export class CreateStatusComponent implements OnInit, OnDestroy { private _replyingUserHandle: string; @Input('replyingUserHandle') set replyingUserHandle(value: string) { - this._replyingUserHandle = value; - this.initMention(); + if (value) { + this._replyingUserHandle = value; + this.initMention(); + } } get replyingUserHandle(): string { return this._replyingUserHandle; @@ -92,7 +96,7 @@ export class CreateStatusComponent implements OnInit, OnDestroy { this.accountChanged(accounts); }); this.selectedAccount = this.toolsService.getSelectedAccounts()[0]; - + if (this.statusReplyingToWrapper) { if (this.statusReplyingToWrapper.status.reblog) { this.statusReplyingTo = this.statusReplyingToWrapper.status.reblog;