diff --git a/Shared/PostList/PostListFilteredView.swift b/Shared/PostList/PostListFilteredView.swift index d528176..3460033 100644 --- a/Shared/PostList/PostListFilteredView.swift +++ b/Shared/PostList/PostListFilteredView.swift @@ -87,7 +87,16 @@ struct PostListFilteredView: View { tag: post, selection: $model.selectedPost ) { - PostCellView(post: post) + if showAllPosts { + if let collection = collections.filter { $0.alias == post.collectionAlias }.first { + PostCellView(post: post, collectionName: collection.title) + } else { + let collectionName = model.account.server == "https://write.as" ? "Anonymous" : "Drafts" + PostCellView(post: post, collectionName: collectionName) + } + } else { + PostCellView(post: post) + } } .deleteDisabled(post.status != PostStatus.local.rawValue) } diff --git a/Shared/PostList/PostListView.swift b/Shared/PostList/PostListView.swift index 5413e88..8199e17 100644 --- a/Shared/PostList/PostListView.swift +++ b/Shared/PostList/PostListView.swift @@ -104,9 +104,9 @@ struct PostListView: View { } .onDisappear { DispatchQueue.main.async { - model.selectedCollection = nil - model.showAllPosts = true - model.selectedPost = nil + self.model.selectedCollection = nil + self.model.showAllPosts = true + self.model.selectedPost = nil } } .navigationTitle(