#59 Show ALT info only when settings is enabled

This commit is contained in:
Marcin Czachurski 2023-04-28 20:09:01 +02:00
parent 4ac4b6ed1a
commit f686d02d88
2 changed files with 29 additions and 25 deletions

View File

@ -6,8 +6,10 @@
import SwiftUI
import ServicesKit
import EnvironmentKit
public struct ImageUploadView: View {
@EnvironmentObject var applicationState: ApplicationState
@ObservedObject public var photoAttachment: PhotoAttachment
private let size: Double
@ -96,6 +98,7 @@ public struct ImageUploadView: View {
Spacer()
}
if self.applicationState.warnAboutMissingAlt {
HStack {
Spacer()
HStack {
@ -127,6 +130,7 @@ public struct ImageUploadView: View {
}
}
}
}
.frame(width: self.size, height: self.size)
} else {
Image("Blurhash")