From 091ddb5db1b7da6abe6f744ebd43d4721f773df3 Mon Sep 17 00:00:00 2001 From: Rohit Verma <101377978+rohit9625@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:10:54 +0530 Subject: [PATCH] revert back to MainScope for database and ui updates (#5914) Co-authored-by: Nicolas Raoul --- .../free/nrw/commons/customselector/ui/selector/ImageLoader.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageLoader.kt b/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageLoader.kt index 95c768c1c2..ddfcf341ea 100644 --- a/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageLoader.kt +++ b/app/src/main/java/fr/free/nrw/commons/customselector/ui/selector/ImageLoader.kt @@ -18,6 +18,7 @@ import fr.free.nrw.commons.utils.CustomSelectorUtils.Companion.checkWhetherFileE import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.MainScope import kotlinx.coroutines.launch import java.util.Calendar import java.util.concurrent.TimeUnit @@ -65,7 +66,7 @@ class ImageLoader /** * Coroutine Scope. */ - private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) + private val scope: CoroutineScope = MainScope() /** * Query image and setUp the view.