* Rework feed polling to correctly detect when new content is available (close #344) * Tweak how the tuner works for consistency * Improve the feed-update behavior after posting * Load latest notifications when opening the tab
This commit is contained in:
parent
449f9243f3
commit
f6f1fe2558
5 changed files with 49 additions and 72 deletions
|
@ -166,7 +166,7 @@ export const ComposePost = observer(function ComposePost({
|
|||
setIsProcessing(false)
|
||||
return
|
||||
}
|
||||
store.me.mainFeed.loadLatest()
|
||||
store.me.mainFeed.checkForLatest({autoPrepend: true})
|
||||
onPost?.()
|
||||
hackfixOnClose()
|
||||
Toast.show(`Your ${replyTo ? 'reply' : 'post'} has been published`)
|
||||
|
|
|
@ -158,7 +158,7 @@ const FeedPage = observer(
|
|||
}, [feed])
|
||||
|
||||
const onPressLoadLatest = React.useCallback(() => {
|
||||
feed.refresh()
|
||||
feed.resetToLatest()
|
||||
scrollToTop()
|
||||
}, [feed, scrollToTop])
|
||||
|
||||
|
|
|
@ -74,7 +74,8 @@ export const NotificationsScreen = withAuthRequired(
|
|||
React.useCallback(() => {
|
||||
store.log.debug('NotificationsScreen: Updating feed')
|
||||
const softResetSub = store.onScreenSoftReset(scrollToTop)
|
||||
store.me.notifications.update()
|
||||
store.me.notifications.loadUnreadCount()
|
||||
store.me.notifications.loadLatest()
|
||||
screen('Notifications')
|
||||
|
||||
return () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue