always reload status to ensure lastest data

This commit is contained in:
Nicolas Constant 2020-04-18 17:38:33 -04:00
parent caf17f9662
commit 3d16be26c5
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 4 additions and 5 deletions

View File

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