From d4b9ef3b0a89f1a5a97ff37024fe7f8d90891b86 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 20 Jan 2023 10:39:00 -0600 Subject: Only use cursors supplied by the server (ref #59) --- src/state/models/notifications-view.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/state/models/notifications-view.ts') diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index bbd7c8080..965efb87d 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -379,8 +379,8 @@ export class NotificationsViewModel { } this._updateAll(res) numToFetch -= res.data.notifications.length - cursor = this.notifications[res.data.notifications.length - 1].indexedAt - } while (numToFetch > 0) + cursor = res.data.cursor + } while (cursor && numToFetch > 0) this._xIdle() } catch (e: any) { this._xIdle(e) -- cgit 1.4.1