Merge pull request #193 from writefreely/macos-fix-navigation

Adapt new navigation to Mac app
This commit is contained in:
Angelo Stavrow 2021-10-15 16:46:19 -04:00 committed by GitHub
commit 590bd0014d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -35,12 +35,12 @@ struct ContentView: View {
.help("Create a new local draft.") .help("Create a new local draft.")
} }
#else #else
CollectionListView(selectedCollection: model.selectedCollection) CollectionListView()
#endif #endif
#if os(macOS) #if os(macOS)
ZStack { ZStack {
PostListView() PostListView(selectedCollection: model.selectedCollection, showAllPosts: model.showAllPosts)
if model.isProcessingRequest { if model.isProcessingRequest {
ZStack { ZStack {
Color(NSColor.controlBackgroundColor).opacity(0.75) Color(NSColor.controlBackgroundColor).opacity(0.75)

View File

@ -159,6 +159,10 @@ struct PostListView: View {
model.account.server == "https://write.as" ? "Anonymous" : "Drafts" model.account.server == "https://write.as" ? "Anonymous" : "Drafts"
) )
) )
.onAppear {
model.selectedCollection = selectedCollection
model.showAllPosts = showAllPosts
}
#endif #endif
} }
} }