Reduce jank in refreshes
parent
17825cd611
commit
e9102bcbac
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue