about summary refs log tree commit diff
path: root/src/state/models/me.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-10-10 10:08:04 -0700
committerGitHub <noreply@github.com>2023-10-10 10:08:04 -0700
commit098f4b526ebbd62fd2517a55e46f1419f277f904 (patch)
treeec760399678238d04d877f23ebb9bc7c44f93dd1 /src/state/models/me.ts
parentf452ce74f4fe5ed5aa215b4b18302623f435d0d2 (diff)
downloadvoidsky-098f4b526ebbd62fd2517a55e46f1419f277f904.tar.zst
Revert "Fix invite codes flash on desktop, use loading placeholder (#1591)" (#1656)
This reverts commit 9278822088d212c9bee6a40a6a8b773bc482242d.
Diffstat (limited to 'src/state/models/me.ts')
-rw-r--r--src/state/models/me.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/state/models/me.ts b/src/state/models/me.ts
index 8a7a4c851..186e61cf6 100644
--- a/src/state/models/me.ts
+++ b/src/state/models/me.ts
@@ -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)
     }
   }