From ba898b6ac69c4b030cda87aad101071724b30624 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Fri, 8 Oct 2021 14:29:18 -0400 Subject: [PATCH] Adapt new navigation to Mac app --- Shared/Navigation/ContentView.swift | 4 ++-- Shared/PostList/PostListView.swift | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Shared/Navigation/ContentView.swift b/Shared/Navigation/ContentView.swift index 2052aad..2771cc6 100644 --- a/Shared/Navigation/ContentView.swift +++ b/Shared/Navigation/ContentView.swift @@ -35,12 +35,12 @@ struct ContentView: View { .help("Create a new local draft.") } #else - CollectionListView(selectedCollection: model.selectedCollection) + CollectionListView() #endif #if os(macOS) ZStack { - PostListView() + PostListView(selectedCollection: model.selectedCollection, showAllPosts: model.showAllPosts) if model.isProcessingRequest { ZStack { Color(NSColor.controlBackgroundColor).opacity(0.75) diff --git a/Shared/PostList/PostListView.swift b/Shared/PostList/PostListView.swift index a7ee1a1..c831740 100644 --- a/Shared/PostList/PostListView.swift +++ b/Shared/PostList/PostListView.swift @@ -159,6 +159,10 @@ struct PostListView: View { model.account.server == "https://write.as" ? "Anonymous" : "Drafts" ) ) + .onAppear { + model.selectedCollection = selectedCollection + model.showAllPosts = showAllPosts + } #endif } }