fix: ios widget webp support (#19469)

This commit is contained in:
Brandon Wees 2025-06-24 10:33:38 -05:00 committed by GitHub
parent bcfc967d77
commit 2e13543d5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 24 deletions

View file

@ -24,27 +24,11 @@ struct ImageEntry: TimelineEntry {
struct ImmichWidgetView: View {
var entry: ImageEntry
func getErrorText(_ error: WidgetError?) -> String {
switch error {
case .noLogin:
return "Login to Immich"
case .fetchFailed:
return "Unable to connect to your Immich instance"
case .albumNotFound:
return "Album not found"
default:
return "An unknown error occured"
}
}
var body: some View {
if entry.image == nil {
VStack {
Image("LaunchImage")
Text(getErrorText(entry.error))
Text(entry.error?.errorDescription ?? "")
.minimumScaleFactor(0.25)
.multilineTextAlignment(.center)
.foregroundStyle(.secondary)