diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-16 13:18:53 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-16 13:18:53 -0600 |
commit | e9102bcbac1a720060456436bee524171a1d66f1 (patch) | |
tree | 558ce4c989e1de868d36f9d9d0fba82a3b1293d5 /src | |
parent | 17825cd611c3bbc47fe55b5e7dfe1a39fdca2274 (diff) | |
download | voidsky-e9102bcbac1a720060456436bee524171a1d66f1.tar.zst |
Reduce jank in refreshes
Diffstat (limited to 'src')
-rw-r--r-- | src/state/models/feed-view.ts | 3 | ||||
-rw-r--r-- | src/state/models/notifications-view.ts | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index e89a54194..67a927a7a 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -194,6 +194,9 @@ export class FeedModel { * Load for first render */ async setup(isRefreshing = false) { + if (isRefreshing) { + this.isRefreshing = true // set optimistically for UI + } if (this._loadPromise) { return this._loadPromise } diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index 3a91eb322..c328be62b 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -160,6 +160,9 @@ export class NotificationsViewModel { * Load for first render */ async setup(isRefreshing = false) { + if (isRefreshing) { + this.isRefreshing = true // set optimistically for UI + } if (this._loadPromise) { return this._loadPromise } |