mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Fix for being sent back to post list on app reactivate
This commit is contained in:
parent
a07443bb35
commit
4dba38c6e1
@ -126,18 +126,20 @@ struct PostListView: View {
|
||||
.frame(height: frameHeight)
|
||||
.background(Color(UIColor.systemGray5))
|
||||
.overlay(Divider(), alignment: .top)
|
||||
.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
|
||||
}
|
||||
}
|
||||
}
|
||||
.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 {
|
||||
self.filteredListViewId += 1
|
||||
}
|
||||
}
|
||||
.onChange(of: model.hasError) { value in
|
||||
if value {
|
||||
|
@ -1246,7 +1246,7 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = "WriteFreely-MultiPlatform (iOS).entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 708;
|
||||
CURRENT_PROJECT_VERSION = 709;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = iOS/Info.plist;
|
||||
@ -1255,7 +1255,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.17;
|
||||
MARKETING_VERSION = 1.0.18;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.abunchtell.WriteFreely-MultiPlatform";
|
||||
PRODUCT_NAME = "WriteFreely-MultiPlatform";
|
||||
SDKROOT = iphoneos;
|
||||
@ -1272,7 +1272,7 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = "WriteFreely-MultiPlatform (iOS).entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 708;
|
||||
CURRENT_PROJECT_VERSION = 709;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = iOS/Info.plist;
|
||||
@ -1281,7 +1281,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.17;
|
||||
MARKETING_VERSION = 1.0.18;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.abunchtell.WriteFreely-MultiPlatform";
|
||||
PRODUCT_NAME = "WriteFreely-MultiPlatform";
|
||||
SDKROOT = iphoneos;
|
||||
|
Loading…
Reference in New Issue
Block a user