Fix stale notifications after returning from background - #1565
Open
oliinykdm wants to merge 2 commits into
Open
Conversation
iOS suspends URLSession tasks in the background and they often never complete, which pinned isFetching and made pull-to-refresh a no-op until force-quit. Invalidate in-flight loads, ignore superseded results, and cap the session resource timeout at 60s instead of the default 7 days. Assisted-by: Grok
The SwiftUI tab root does not refetch on resume. Reload only Home and Notifications, apply new rows immediately, and show the new-items snackbar on Notifications. Assisted-by: Grok
Contributor
|
Thank you very much. We are just reaching the end of a major top-level navigation rearchitecture (currently on a branch). I don't think these changes will apply as-is, but I'll do my best to incorporate them before shipping the next version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1554
The in-app Home and Notifications feeds often stop updating until you force-quit the app. Pull-to-refresh can spin and do nothing; sometimes you have to pull twice. I hit this constantly on my own phone, and the same reports have been coming in for years (#1554, #942, #1402).
The iOS app does not use streaming. Those screens are REST snapshots that are not reliably refetched after the process is backgrounded, and a request frozen by iOS can pin
isFetchingso refresh never runs.This reloads Home and Notifications when the scene becomes active, abandons stuck fetches, and applies new rows immediately.
Please let me know if I'm wrong or if it is planned to be fixed by an another way. I wish just to make an app feel reliable and not pay for Ivory just because of this.
Thanks!