Reduce jank in refreshes

zio/stable
Paul Frazee 2022-11-16 13:18:53 -06:00
parent 17825cd611
commit e9102bcbac
2 changed files with 6 additions and 0 deletions

View File

@ -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
}

View File

@ -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
}