diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 710d374b..a1647518 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -438,10 +438,8 @@ export class FeedModel { } this._updateAll(res) numToFetch -= res.data.feed.length - cursor = this.feed[res.data.feed.length - 1] - ? ts(this.feed[res.data.feed.length - 1]) - : undefined - } while (numToFetch > 0) + cursor = res.data.cursor + } while (cursor && numToFetch > 0) this._xIdle() } catch (e: any) { this._xIdle(e) diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index bbd7c808..965efb87 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) diff --git a/src/state/models/user-follows-view.ts b/src/state/models/user-follows-view.ts index 40f12b43..d43a10c7 100644 --- a/src/state/models/user-follows-view.ts +++ b/src/state/models/user-follows-view.ts @@ -1,6 +1,6 @@ import {makeAutoObservable} from 'mobx' import { - AppBskyGraphGetFollowers as GetFollows, + AppBskyGraphGetFollows as GetFollows, AppBskyActorRef as ActorRef, } from '@atproto/api' import {RootStoreModel} from './root-store'