feat(immich): add prefetch and mobile data controls
Adds Immich image prefetch and a mobile data option to the UI. Android now ships ImmichPrefetchWorker to fetch originals in the background. Frontend and desktop code are updated to expose and persist new settings. Translations cover the new labels and hints in multiple languages. - Introduce ImmichPrefetchWorker for background prefetch - Add allowMobileData and prefetchImmich UI controls - Wire changes to desktop state and translations
This commit is contained in:
@@ -170,11 +170,14 @@ class WallpaperPlugin(private val activity: Activity) : Plugin(activity) {
|
||||
@Command fun connectImmich(invoke: Invoke) = io.execute {
|
||||
try {
|
||||
val args = invoke.parseArgs(ImmichConnectArgs::class.java)
|
||||
invoke.resolve(ImmichClient.connect(activity, args.serverUrl, args.apiKey))
|
||||
val result = ImmichClient.connect(activity, args.serverUrl, args.apiKey)
|
||||
if (WallpaperStore.prefetchImmich(activity)) ImmichPrefetchWorker.enqueue(activity)
|
||||
invoke.resolve(result)
|
||||
} catch (error: Exception) { invoke.reject(error.message ?: "Immich-Verbindung fehlgeschlagen") }
|
||||
}
|
||||
|
||||
@Command fun disconnectImmich(invoke: Invoke) = io.execute {
|
||||
ImmichPrefetchWorker.cancel(activity)
|
||||
invoke.resolve(ImmichClient.disconnect(activity))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user