mirror of
https://github.com/NicolasConstant/sengi
synced 2025-02-09 00:18:44 +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;
|
const sourceAccount = openThreadEvent.sourceAccount;
|
||||||
|
|
||||||
if (status.visibility === 'public' || status.visibility === 'unlisted') {
|
if (status.visibility === 'public' || status.visibility === 'unlisted') {
|
||||||
var statusPromise: Promise<Status> = Promise.resolve(status);
|
// var statusPromise: Promise<Status> = Promise.resolve(status);
|
||||||
|
// if (!sourceAccount || sourceAccount.id !== currentAccount.id) {
|
||||||
if (!sourceAccount || sourceAccount.id !== currentAccount.id) {
|
var statusPromise = this.toolsService.getInstanceInfo(currentAccount)
|
||||||
statusPromise = this.toolsService.getInstanceInfo(currentAccount)
|
|
||||||
.then(instance => {
|
.then(instance => {
|
||||||
let version: 'v1' | 'v2' = 'v1';
|
let version: 'v1' | 'v2' = 'v1';
|
||||||
if (instance.major >= 3) version = 'v2';
|
if (instance.major >= 3) version = 'v2';
|
||||||
@ -149,7 +148,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
throw new Error('could not find status');
|
throw new Error('could not find status');
|
||||||
});
|
});
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.retrieveThread(currentAccount, statusPromise);
|
this.retrieveThread(currentAccount, statusPromise);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user