diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-07-26 12:02:34 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-07-26 12:02:34 -0500 |
commit | 62eb9f3c937028b6a6a8a3af40a03978fda5fef4 (patch) | |
tree | 4b027aea02c4e521632a54a9104fdffe665b2108 /src/state/models/liked-by-view.ts | |
parent | 1504d144d9bbb90e4e048702f1e1b3db9d7ce17e (diff) | |
download | voidsky-62eb9f3c937028b6a6a8a3af40a03978fda5fef4.tar.zst |
Add followers and follows list
Diffstat (limited to 'src/state/models/liked-by-view.ts')
-rw-r--r-- | src/state/models/liked-by-view.ts | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/state/models/liked-by-view.ts b/src/state/models/liked-by-view.ts index e9548f27b..91c94093d 100644 --- a/src/state/models/liked-by-view.ts +++ b/src/state/models/liked-by-view.ts @@ -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 |