Fix notification fetch abort condition
This commit is contained in:
@@ -356,7 +356,9 @@ export class NotificationsFeedModel {
|
||||
} catch (e) {
|
||||
this.rootStore.log.error('NotificationsModel:processQueue failed', {e})
|
||||
} finally {
|
||||
this.isRefreshing = false
|
||||
runInAction(() => {
|
||||
this.isRefreshing = false
|
||||
})
|
||||
this.lock.release()
|
||||
}
|
||||
})
|
||||
@@ -508,7 +510,7 @@ export class NotificationsFeedModel {
|
||||
}
|
||||
accRes.data.notifications.push(notif)
|
||||
}
|
||||
if (pageIsDone) {
|
||||
if (pageIsDone || res.data.notifications.length < PAGE_SIZE) {
|
||||
return accRes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,6 @@ export const NotificationsScreen = withAuthRequired(
|
||||
onScroll={onMainScroll}
|
||||
scrollElRef={scrollElRef}
|
||||
/>
|
||||
|
||||
{store.me.notifications.hasNewLatest &&
|
||||
!store.me.notifications.isRefreshing && (
|
||||
<LoadLatestBtn onPress={onPressLoadLatest} label="notifications" />
|
||||
|
||||
Reference in New Issue
Block a user