Fix file deletion

This commit is contained in:
Christoph Hagen
2025-01-07 14:04:00 +01:00
parent c5a00ef0f8
commit acd0902869
10 changed files with 98 additions and 3 deletions

View File

@ -79,6 +79,13 @@ final class LocalizedPost: ObservableObject {
}
return text.contains(string)
}
func remove(_ file: FileResource) {
if images.contains(file) {
images.remove(file)
}
remove(linkPreviewImage: file)
}
}
extension LocalizedPost: LinkPreviewItem {