Compare commits

..

1 Commits

Author SHA1 Message Date
Alex
5136f16e6d fix: make sure iOS memory widget render 2026-07-23 13:42:29 -05:00
3 changed files with 16 additions and 41 deletions

View File

@@ -18,21 +18,15 @@ struct ImmichWidgetView: View {
var body: some View {
if entry.image == nil {
Image("LaunchImage")
.tintedWidgetImageModifier()
.overlay(alignment: .bottom) {
if let error = entry.metadata.error?.errorDescription {
Text(error)
.minimumScaleFactor(0.25)
.multilineTextAlignment(.center)
.foregroundStyle(.secondary)
.fixedSize()
.alignmentGuide(.bottom) { dimensions in
// Place the text below the bottom of the image
dimensions[.top] - 8
}
}
}
VStack {
Image("LaunchImage")
.tintedWidgetImageModifier()
Text(entry.metadata.error?.errorDescription ?? "")
.minimumScaleFactor(0.25)
.multilineTextAlignment(.center)
.foregroundStyle(.secondary)
}
.padding(16)
} else {
ZStack(alignment: .leading) {
Color.clear.overlay(

View File

@@ -83,7 +83,13 @@ struct ImmichMemoryProvider: TimelineProvider {
return
}
let memories = try await api.fetchMemory(for: Date.now)
let memories: [MemoryResult]
do {
memories = try await api.fetchMemory(for: Date.now)
} catch {
completion(ImageEntry.handleError(for: cacheKey))
return
}
await withTaskGroup(of: ImageEntry?.self) { group in
var totalAssets = 0

View File

@@ -1,25 +0,0 @@
import { Kysely, sql } from 'kysely';
export async function up(db: Kysely<any>): Promise<void> {
await sql`
INSERT INTO "user_metadata" ("userId", "key", "value")
SELECT "user"."id", 'preferences', jsonb_build_object('people', jsonb_build_object('minimumFaces', "config"."minFaces"))
FROM "user"
CROSS JOIN (
SELECT "value"->'machineLearning'->'facialRecognition'->'minFaces' AS "minFaces"
FROM "system_metadata"
WHERE "key" = 'system-config'
AND "value"->'machineLearning'->'facialRecognition'->'minFaces' IS NOT NULL
) AS "config"
ON CONFLICT ("userId", "key") DO UPDATE
SET "value" = "user_metadata"."value" || jsonb_build_object(
'people',
COALESCE("user_metadata"."value"->'people', '{}'::jsonb) || (EXCLUDED."value"->'people')
)
WHERE "user_metadata"."value"->'people'->'minimumFaces' IS NULL
`.execute(db);
}
export async function down(): Promise<void> {
// not supported
}