Fix: fetch follows before everything else to avoid rendering follow buttons wrongly

zio/stable
Paul Frazee 2023-03-06 15:40:52 -06:00
parent e069bde75c
commit bb6bd905c2
1 changed files with 11 additions and 11 deletions

View File

@ -97,17 +97,17 @@ export class MeModel {
} }
}) })
this.mainFeed.clear() this.mainFeed.clear()
await Promise.all([ await this.follows.fetch().catch(e => {
this.mainFeed.setup().catch(e => { this.rootStore.log.error('Failed to load my follows', e)
this.rootStore.log.error('Failed to setup main feed model', e) }),
}), await Promise.all([
this.notifications.setup().catch(e => { this.mainFeed.setup().catch(e => {
this.rootStore.log.error('Failed to setup notifications model', e) this.rootStore.log.error('Failed to setup main feed model', e)
}), }),
this.follows.fetch().catch(e => { this.notifications.setup().catch(e => {
this.rootStore.log.error('Failed to load my follows', e) this.rootStore.log.error('Failed to setup notifications model', e)
}), }),
]) ])
this.rootStore.emitSessionLoaded() this.rootStore.emitSessionLoaded()
} else { } else {
this.clear() this.clear()