mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: an oversized install step count falls back to the step text
This commit is contained in:
1 parent
7419ba114f
commit
5981bbb1e2
1 file changed
+3
-1
@@ -139,7 +139,9 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
if (done != null && total != null && total > 0) {
|
||||
return "$done / $total MB" to (done * 100 / total).toInt().coerceIn(0, 100)
|
||||
}
|
||||
return count.groupValues[1] to count.groupValues[2].toInt() * 100 / maxOf(1, count.groupValues[3].toInt())
|
||||
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)
|
||||
}
|
||||
|
||||
internal fun readableScriptStep(scriptStep: String): Boolean {
|
||||
|
||||
Reference in new issue
Block a user