You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
First of all, thank you very much for WriteFreely and the iOs App, I have been using it to keep my family up-to-date with my travels for five months now, with great success!
When using the application on my iPhone SE 2nd generation (iOs 17.3), I noticed that whenever the focus changes away from the application while editing a post, the post closes.
In a bit more detail:
Steps to Reproduce:
Create new post
Write some text
Pull up iOs quick settings
Close quick settings
Expected behaviour
Post is still open, ready to be edited
Actual behaviour
Post is closed
The text was updated successfully, but these errors were encountered:
AntonOellerer
changed the title
Post closes when focus is lost
Post closes when focus is lost on iPhone
Mar 6, 2024
Okay, after a lot of debugging, I've figured out why this is happening in iOS 17.
In the PostListView —the screen that shows the list of posts— there's an onReceive modifier that listens for when the app has become active:
.onReceive(NotificationCenter.default.publisher(for:UIApplication.didBecomeActiveNotification)){ _ in
// We use this to invalidate and refresh the view, so that new posts created outside of the app (e.g.,
// in the action extension) show up.
withAnimation{self.filteredListViewId +=1}}
As the comment suggests, we use this to force the app to refresh the list. This was added when we added the Safari extension that lets you create a new local draft from selected text on a webpage, so that if you returned to the app the list would reload and show the new, extension-created local draft.
Commenting out this code fixes the bug you reported, but breaks the ability to refresh the list of posts when the app becomes active. I'm investigating to see why this broke in iOS 17, when it was working as expected previously. 🤔
Hey,
First of all, thank you very much for WriteFreely and the iOs App, I have been using it to keep my family up-to-date with my travels for five months now, with great success!
When using the application on my iPhone SE 2nd generation (iOs 17.3), I noticed that whenever the focus changes away from the application while editing a post, the post closes.
In a bit more detail:
Steps to Reproduce:
Expected behaviour
Post is still open, ready to be edited
Actual behaviour
Post is closed
The text was updated successfully, but these errors were encountered: