From 2d7026ac7af92b402208042ae032905cb9c08601 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 4 Mar 2024 13:43:25 +0100 Subject: [PATCH] feat: Use more appropriate progress values --- .../kotlin/app/revanced/manager/flutter/MainActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt index 6164c929..e3ac9beb 100644 --- a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt +++ b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt @@ -285,7 +285,7 @@ class MainActivity : FlutterActivity() { ) if (cancel(patcher::close)) return@Thread - updateProgress(0.1, "Loading patches...", "Loading patches") + updateProgress(0.02, "Loading patches...", "Loading patches") val patches = patches.filter { patch -> val isCompatible = patch.compatiblePackages?.any { @@ -303,7 +303,7 @@ class MainActivity : FlutterActivity() { }.toSet() if (cancel(patcher::close)) return@Thread - updateProgress(0.15, "Executing...", "") + updateProgress(0.05, "Executing...", "") val patcherResult = patcher.use { patcher.apply { @@ -315,7 +315,7 @@ class MainActivity : FlutterActivity() { // Update the progress bar every time a patch is executed from 0.15 to 0.7 val totalPatchesCount = patches.size val progressStep = 0.55 / totalPatchesCount - var progress = 0.15 + var progress = 0.05 patcher.apply(false).collect(FlowCollector { patchResult: PatchResult -> if (cancel(patcher::close)) return@FlowCollector