Run import on IO.

This commit is contained in:
Koen J
2026-02-10 14:48:03 +01:00
parent 7b76ba1539
commit 4a08058322
@@ -462,6 +462,7 @@ class StateBackup {
UIDialogs.Action("No", {
}, UIDialogs.ActionStyle.NONE),
UIDialogs.Action("Yes", {
scope.launch(Dispatchers.IO) {
for (historyStr in store.value) {
try {
val histObj = HistoryVideo.fromReconString(historyStr) { url -> return@fromReconString export.cache?.videos?.firstOrNull { it.url == url }; }
@@ -472,6 +473,7 @@ class StateBackup {
Logger.e(TAG, "Failed to import subscription group", ex);
}
}
}
}, UIDialogs.ActionStyle.PRIMARY)
)
}
@@ -481,6 +483,7 @@ class StateBackup {
UIDialogs.Action("No", {
}, UIDialogs.ActionStyle.NONE),
UIDialogs.Action("Yes", {
scope.launch(Dispatchers.IO) {
for (groupStr in store.value) {
try {
val group = Json.decodeFromString<SubscriptionGroup>(groupStr);
@@ -492,6 +495,7 @@ class StateBackup {
Logger.e(TAG, "Failed to import subscription group", ex);
}
}
}
}, UIDialogs.ActionStyle.PRIMARY)
)
}