Fix for being sent back to post list on app reactivate

This commit is contained in:
Angelo Stavrow 2024-04-14 14:17:13 -04:00
parent 8ddafcb11e
commit 7187d545a8
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -130,9 +130,11 @@ struct PostListView: View {
.ignoresSafeArea(.all, edges: .bottom)
.onAppear {
// Set the selected collection and whether or not we want to show all posts
print("Setting selected collection")
model.selectedCollection = selectedCollection
model.showAllPosts = showAllPosts
print("Invalidating/refreshing PostListView")
// 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 {