Skip to content

Fix stale notifications after returning from background - #1565

Open
oliinykdm wants to merge 2 commits into
mastodon:2026_06_17_SwiftTabViewfrom
oliinykdm:fix/stale-notifications-swift-tabview
Open

Fix stale notifications after returning from background#1565
oliinykdm wants to merge 2 commits into
mastodon:2026_06_17_SwiftTabViewfrom
oliinykdm:fix/stale-notifications-swift-tabview

Conversation

@oliinykdm

Copy link
Copy Markdown

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 isFetching so 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!

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
@oliinykdm oliinykdm changed the title Fix stale notifications swift tabview Fix stale notifications after returning from background Aug 20, 2026
@whattherestimefor

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants