Unified detail views, model

This commit is contained in:
Christoph Hagen
2024-12-16 09:54:21 +01:00
parent 1e67a99866
commit 31d1ecb8bd
57 changed files with 853 additions and 954 deletions

View File

@ -65,6 +65,13 @@ final class Post: ObservableObject {
}
}
func isValid(id: String) -> Bool {
!id.isEmpty &&
content.isValidIdForTagOrPageOrPost(id) &&
content.isNewIdForPost(id)
}
@discardableResult
func update(id newId: String) -> Bool {
do {
try content.storage.move(post: id, to: newId)