mirror of
https://github.com/NicolasConstant/sengi
synced 2025-02-02 11:36:54 +01:00
always reload status to ensure lastest data
This commit is contained in:
parent
caf17f9662
commit
3d16be26c5
@ -133,10 +133,9 @@ export class ThreadComponent implements OnInit, OnDestroy {
|
||||
const sourceAccount = openThreadEvent.sourceAccount;
|
||||
|
||||
if (status.visibility === 'public' || status.visibility === 'unlisted') {
|
||||
var statusPromise: Promise<Status> = Promise.resolve(status);
|
||||
|
||||
if (!sourceAccount || sourceAccount.id !== currentAccount.id) {
|
||||
statusPromise = this.toolsService.getInstanceInfo(currentAccount)
|
||||
// var statusPromise: Promise<Status> = Promise.resolve(status);
|
||||
// if (!sourceAccount || sourceAccount.id !== currentAccount.id) {
|
||||
var statusPromise = this.toolsService.getInstanceInfo(currentAccount)
|
||||
.then(instance => {
|
||||
let version: 'v1' | 'v2' = 'v1';
|
||||
if (instance.major >= 3) version = 'v2';
|
||||
@ -149,7 +148,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
throw new Error('could not find status');
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
this.retrieveThread(currentAccount, statusPromise);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user