about summary refs log tree commit diff
path: root/src/state/models/notifications-view.ts
diff options
context:
space:
mode:
authorJoão Ferreiro <ferreiro@pinkroom.dev>2022-11-28 16:56:05 +0000
committerJoão Ferreiro <ferreiro@pinkroom.dev>2022-11-28 16:56:05 +0000
commitc5f3200d6b561af94ec98259e731d9e090719df0 (patch)
tree1847500a3041ed9d1642e12c6f01e3581b8aafb6 /src/state/models/notifications-view.ts
parent5ea750599d08229d4b5b10d0e724ca14c73735f5 (diff)
parentb9c9895c45158b3db52e07114ad4305d85e803ea (diff)
downloadvoidsky-c5f3200d6b561af94ec98259e731d9e090719df0.tar.zst
Merge branch 'main' into upload-image
Diffstat (limited to 'src/state/models/notifications-view.ts')
-rw-r--r--src/state/models/notifications-view.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts
index 09189cfbb..80e5c80c6 100644
--- a/src/state/models/notifications-view.ts
+++ b/src/state/models/notifications-view.ts
@@ -7,7 +7,7 @@ import {APP_BSKY_GRAPH} from '../../third-party/api'
 import {cleanError} from '../../lib/strings'
 
 const UNGROUPABLE_REASONS = ['trend', 'assertion']
-
+const PAGE_SIZE = 30
 const MS_60MIN = 1e3 * 60 * 60
 
 export interface GroupedNotification extends ListNotifications.Notification {
@@ -242,9 +242,10 @@ export class NotificationsViewModel {
   private async _initialLoad(isRefreshing = false) {
     this._xLoading(isRefreshing)
     try {
-      const res = await this.rootStore.api.app.bsky.notification.list(
-        this.params,
-      )
+      const params = Object.assign({}, this.params, {
+        limit: PAGE_SIZE,
+      })
+      const res = await this.rootStore.api.app.bsky.notification.list(params)
       this._replaceAll(res)
       this._xIdle()
     } catch (e: any) {
@@ -259,6 +260,7 @@ export class NotificationsViewModel {
     this._xLoading()
     try {
       const params = Object.assign({}, this.params, {
+        limit: PAGE_SIZE,
         before: this.loadMoreCursor,
       })
       const res = await this.rootStore.api.app.bsky.notification.list(params)