Add button to remove a tag

This commit is contained in:
Christoph Hagen
2025-05-04 11:55:54 +02:00
parent a8920a4cd2
commit a4710d525b
4 changed files with 40 additions and 6 deletions

View File

@ -151,9 +151,7 @@ final class Storage: ObservableObject {
Completely delete a post file from the content folder
*/
func delete(page pageId: String) -> Bool {
guard let contentScope else {
return false
}
guard let contentScope else { return false }
guard contentScope.deleteFile(at: pageMetadataPath(page: pageId)) else {
return false
}
@ -213,9 +211,7 @@ final class Storage: ObservableObject {
Completely delete a post file from the content folder
*/
func delete(post postId: String) -> Bool {
guard let contentScope else {
return false
}
guard let contentScope else { return false }
return contentScope.deleteFile(at: postFilePath(post: postId))
}
@ -258,6 +254,11 @@ final class Storage: ObservableObject {
return contentScope.move(tagFilePath(tag: tagId), to: tagFilePath(tag: newId))
}
func delete(tag tagId: String) -> Bool {
guard let contentScope else { return false }
return contentScope.deleteFile(at: tagFilePath(tag: tagId))
}
// MARK: Files
func size(of file: String) -> Int? {