twodayslate / claw

A lobste.rs Reader
https://apps.apple.com/us/app/id1531645542
Other
35 stars 1 forks source link

SFSafariViewController close refreshes story list #21

Closed twodayslate closed 3 years ago

twodayslate commented 3 years ago

If not on the first page of stories if you close the SFSafariViewcontroller you don't go back to the story but the list of stories and only the first page.

twodayslate commented 3 years ago

I added this as a comment but the fetcher was being deinitialized when the SFSafariViewController was being presented. This would reload the story list. I'm not sure why this would go back to the root view controller (maybe a SwiftUI bug) but it did enough to do so. The fix was to make sure it wasn't deinitialized by using a singleton.