1
0
mirror of https://github.com/NicolasConstant/sengi synced 2025-01-24 07:22:50 +01:00

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

View File

@ -51,8 +51,10 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
private _isDirectMention: boolean; private _isDirectMention: boolean;
@Input('isDirectMention') @Input('isDirectMention')
set isDirectMention(value: boolean) { set isDirectMention(value: boolean) {
this._isDirectMention = value; if (value) {
this.initMention(); this._isDirectMention = value;
this.initMention();
}
} }
get isDirectMention(): boolean { get isDirectMention(): boolean {
return this._isDirectMention; return this._isDirectMention;
@ -61,8 +63,10 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
private _replyingUserHandle: string; private _replyingUserHandle: string;
@Input('replyingUserHandle') @Input('replyingUserHandle')
set replyingUserHandle(value: string) { set replyingUserHandle(value: string) {
this._replyingUserHandle = value; if (value) {
this.initMention(); this._replyingUserHandle = value;
this.initMention();
}
} }
get replyingUserHandle(): string { get replyingUserHandle(): string {
return this._replyingUserHandle; return this._replyingUserHandle;
@ -92,7 +96,7 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
this.accountChanged(accounts); this.accountChanged(accounts);
}); });
this.selectedAccount = this.toolsService.getSelectedAccounts()[0]; this.selectedAccount = this.toolsService.getSelectedAccounts()[0];
if (this.statusReplyingToWrapper) { if (this.statusReplyingToWrapper) {
if (this.statusReplyingToWrapper.status.reblog) { if (this.statusReplyingToWrapper.status.reblog) {
this.statusReplyingTo = this.statusReplyingToWrapper.status.reblog; this.statusReplyingTo = this.statusReplyingToWrapper.status.reblog;