Show blog name badge in All Posts list

This commit is contained in:
Angelo Stavrow 2020-12-08 11:55:32 -05:00
parent 709a654528
commit 246d3948a9
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -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)
}