1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

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
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)