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