fix create new status mention bug

This commit is contained in:
Nicolas Constant 2019-07-05 17:22:33 -04:00
parent 60f8c23c5b
commit 30e9fdc2d9
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 9 additions and 5 deletions

View File

@ -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;