Add followers and follows list

This commit is contained in:
Paul Frazee 2022-07-26 12:02:34 -05:00
parent 1504d144d9
commit 62eb9f3c93
14 changed files with 645 additions and 26 deletions

View file

@ -73,7 +73,11 @@ export class LikedByViewModel implements bsky.LikedByView.Response {
}
async refresh() {
await this._refresh()
await this._fetch(true)
}
async loadMore() {
// TODO
}
// state transitions
@ -105,8 +109,8 @@ export class LikedByViewModel implements bsky.LikedByView.Response {
})
}
private async _fetch() {
this._xLoading()
private async _fetch(isRefreshing = false) {
this._xLoading(isRefreshing)
await new Promise(r => setTimeout(r, 250)) // DEBUG
try {
const res = (await this.rootStore.api.mainPds.view(
@ -120,13 +124,6 @@ export class LikedByViewModel implements bsky.LikedByView.Response {
}
}
private async _refresh() {
this._xLoading(true)
// TODO: refetch and update items
await new Promise(r => setTimeout(r, 250)) // DEBUG
this._xIdle()
}
private _replaceAll(res: bsky.LikedByView.Response) {
this.likedBy.length = 0
let counter = 0