1
0
mirror of https://github.com/NicolasConstant/sengi synced 2025-02-08 07:58:47 +01:00

fix context-menu init

This commit is contained in:
Nicolas Constant 2019-08-11 16:56:25 -04:00
parent f6b7f95bd6
commit f7f5678526
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688

View File

@ -49,20 +49,19 @@ export class StatusUserContextMenuComponent implements OnInit, OnDestroy {
ngOnInit() {
if (this.statusWrapper) {
const status = this.statusWrapper.status;
if (status.reblog) {
this.displayedStatus = status.reblog;
} else {
this.displayedStatus = status;
}
this.accountSub = this.accounts$.subscribe((accounts: AccountInfo[]) => {
this.loadedAccounts = accounts;
this.checkStatus(accounts);
});
}
}
this.accountSub = this.accounts$.subscribe((accounts: AccountInfo[]) => {
this.loadedAccounts = accounts;
if (this.statusWrapper) this.checkStatus(accounts);
});
let account: Account;
if(this.statusWrapper) {
account = this.displayedStatus.account;