From 4e39df270716ab23e9d2a86a7294dcf516080b1f Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 24 Feb 2026 17:21:37 -0500 Subject: [PATCH] Initializes the disk cache on an io thread after 3 seconds. --- .../main/java/com/vitorpamplona/amethyst/AppModules.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt index f89c08a22..8c13563f3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt @@ -73,6 +73,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancel +import kotlinx.coroutines.delay import kotlinx.coroutines.launch import java.io.File @@ -293,6 +294,13 @@ class AppModules( // registers to receive events pokeyReceiver.register(appContext) + + // initializes diskcache on an IO thread. + applicationIOScope.launch { + // Sets Coil - Tor - OkHttp link + delay(3000) + videoCache + } } fun terminate(appContext: Context) {