Unified detail views, model
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user