Only use cursors supplied by the server (ref #59)
parent
c4cca8cf6c
commit
d4b9ef3b0a
|
@ -438,10 +438,8 @@ export class FeedModel {
|
||||||
}
|
}
|
||||||
this._updateAll(res)
|
this._updateAll(res)
|
||||||
numToFetch -= res.data.feed.length
|
numToFetch -= res.data.feed.length
|
||||||
cursor = this.feed[res.data.feed.length - 1]
|
cursor = res.data.cursor
|
||||||
? ts(this.feed[res.data.feed.length - 1])
|
} while (cursor && numToFetch > 0)
|
||||||
: undefined
|
|
||||||
} while (numToFetch > 0)
|
|
||||||
this._xIdle()
|
this._xIdle()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this._xIdle(e)
|
this._xIdle(e)
|
||||||
|
|
|
@ -379,8 +379,8 @@ export class NotificationsViewModel {
|
||||||
}
|
}
|
||||||
this._updateAll(res)
|
this._updateAll(res)
|
||||||
numToFetch -= res.data.notifications.length
|
numToFetch -= res.data.notifications.length
|
||||||
cursor = this.notifications[res.data.notifications.length - 1].indexedAt
|
cursor = res.data.cursor
|
||||||
} while (numToFetch > 0)
|
} while (cursor && numToFetch > 0)
|
||||||
this._xIdle()
|
this._xIdle()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this._xIdle(e)
|
this._xIdle(e)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {makeAutoObservable} from 'mobx'
|
import {makeAutoObservable} from 'mobx'
|
||||||
import {
|
import {
|
||||||
AppBskyGraphGetFollowers as GetFollows,
|
AppBskyGraphGetFollows as GetFollows,
|
||||||
AppBskyActorRef as ActorRef,
|
AppBskyActorRef as ActorRef,
|
||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
import {RootStoreModel} from './root-store'
|
import {RootStoreModel} from './root-store'
|
||||||
|
|
Loading…
Reference in New Issue