about summary refs log tree commit diff
path: root/src/state/models/feeds/notifications.ts
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-08-31 16:45:18 -0700
committerGitHub <noreply@github.com>2023-08-31 16:45:18 -0700
commit4cd3ddecadfaad1e1711b916760590cd18fba675 (patch)
tree98dcbe7dc37469c56ea34705893ce04fc0a976f3 /src/state/models/feeds/notifications.ts
parentf16cc9537adc721d48ad4a63b882a6515eda3049 (diff)
downloadvoidsky-4cd3ddecadfaad1e1711b916760590cd18fba675.tar.zst
refresh when empty (#1354)
Diffstat (limited to 'src/state/models/feeds/notifications.ts')
-rw-r--r--src/state/models/feeds/notifications.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/state/models/feeds/notifications.ts b/src/state/models/feeds/notifications.ts
index a9836d38f..34f5d4add 100644
--- a/src/state/models/feeds/notifications.ts
+++ b/src/state/models/feeds/notifications.ts
@@ -405,6 +405,13 @@ export class NotificationsFeedModel {
     } finally {
       this.lock.release()
     }
+
+    // if there are no notifications, we should refresh the list
+    // this will only run for new users who have no notifications
+    // NOTE: needs to be after the lock is released
+    if (this.isEmpty) {
+      this.refresh()
+    }
   })
 
   /**