consolidate tags, hide date

This commit is contained in:
Christoph Hagen
2025-01-05 12:19:32 +01:00
parent 93e642c3c9
commit 5ac5a7b000
26 changed files with 284 additions and 129 deletions

View File

@ -76,6 +76,16 @@ struct PostDetailView: View {
title: "Linked page",
selectedPage: $post.linkedPage,
footer: "The page to open when clicking on the post")
.onChange(of: post.linkedPage) { oldValue, newValue in
if newValue != nil {
post.tags = []
} else {
// Link removed, so copy tags from previous link
if let oldValue {
post.tags = oldValue.tags
}
}
}
LocalizedPostDetailView(post: post.localized(in: language))
}