Revert "Fix invite codes flash on desktop, use loading placeholder (#1591)" (#1656)

This reverts commit 9278822088.
This commit is contained in:
Paul Frazee
2023-10-10 10:08:04 -07:00
committed by GitHub
parent f452ce74f4
commit 098f4b526e
5 changed files with 89 additions and 142 deletions
+3 -5
View File
@@ -25,13 +25,13 @@ export class MeModel {
savedFeeds: SavedFeedsModel
notifications: NotificationsFeedModel
follows: MyFollowsCache
invites: ComAtprotoServerDefs.InviteCode[] | null = []
invites: ComAtprotoServerDefs.InviteCode[] = []
appPasswords: ComAtprotoServerListAppPasswords.AppPassword[] = []
lastProfileStateUpdate = Date.now()
lastNotifsUpdate = Date.now()
get invitesAvailable() {
return this.invites?.filter(isInviteAvailable).length || null
return this.invites.filter(isInviteAvailable).length
}
constructor(public rootStore: RootStoreModel) {
@@ -180,9 +180,7 @@ export class MeModel {
} catch (e) {
this.rootStore.log.error('Failed to fetch user invite codes', e)
}
if (this.invites) {
await this.rootStore.invitedUsers.fetch(this.invites)
}
await this.rootStore.invitedUsers.fetch(this.invites)
}
}