mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-03 07:14:25 +02:00
fix merge issues
This commit is contained in:
parent
2f1426408a
commit
536a24169c
@ -223,12 +223,6 @@ class PatcherWorker(
|
||||
args.selectedPatches,
|
||||
args.options,
|
||||
args.logger,
|
||||
/*
|
||||
onPatchCompleted = {
|
||||
args.patchesProgress.update { (completed, total) ->
|
||||
completed + 1 to total
|
||||
}
|
||||
},*/
|
||||
args.onPatchCompleted,
|
||||
args.onProgress
|
||||
)
|
||||
|
@ -120,7 +120,10 @@ fun Steps(
|
||||
steps.forEach { step ->
|
||||
val (progress, progressText) = when (step.progressKey) {
|
||||
null -> null
|
||||
ProgressKey.DOWNLOAD -> stepProgressProvider.downloadProgress?.let { (downloaded, total) -> downloaded / total to "$downloaded/$total MB" }
|
||||
ProgressKey.DOWNLOAD -> stepProgressProvider.downloadProgress?.let { (downloaded, total) ->
|
||||
if (total != null) downloaded.toFloat() / total.toFloat() to "${downloaded.megaBytes}/${total.megaBytes} MB"
|
||||
else null to "${downloaded.megaBytes} MB"
|
||||
}
|
||||
} ?: (null to null)
|
||||
|
||||
SubStep(
|
||||
@ -239,13 +242,6 @@ fun StepIcon(state: State, progress: Float? = null, size: Dp) {
|
||||
contentDescription = description
|
||||
}
|
||||
},
|
||||
/*
|
||||
progress = {
|
||||
progress?.let { (current, total) ->
|
||||
if (total == null) return@let null
|
||||
current / total
|
||||
}?.toFloat()
|
||||
},*/
|
||||
progress = { progress },
|
||||
strokeWidth = strokeWidth
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ enum class ProgressKey {
|
||||
}
|
||||
|
||||
interface StepProgressProvider {
|
||||
val downloadProgress: Pair<Float, Float>?
|
||||
val downloadProgress: Pair<Long, Long?>?
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
|
@ -147,7 +147,7 @@ class PatcherViewModel(
|
||||
key = "downloadProgress",
|
||||
stateSaver = autoSaver()
|
||||
) {
|
||||
mutableStateOf<Pair<Float, Float>?>(null)
|
||||
mutableStateOf<Pair<Long, Long?>?>(null)
|
||||
}
|
||||
private set
|
||||
val steps by savedStateHandle.saveable(saver = snapshotStateListSaver()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user