mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
fix: install step progress cannot overflow
This commit is contained in:
1 parent
5981bbb1e2
commit
132f40ac97
1 file changed
+1
-1
@@ -141,7 +141,7 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
}
|
||||
val part = count.groupValues[2].toIntOrNull() ?: return null
|
||||
val all = count.groupValues[3].toIntOrNull() ?: return null
|
||||
return count.groupValues[1] to part * 100 / maxOf(1, all)
|
||||
return count.groupValues[1] to (part.toLong() * 100 / maxOf(1, all)).coerceIn(0L, 100L).toInt()
|
||||
}
|
||||
|
||||
internal fun readableScriptStep(scriptStep: String): Boolean {
|
||||
|
||||
Reference in new issue
Block a user