mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-19 17:23:58 +00:00
feat: improve patcher screen labels
This commit is contained in:
@@ -47,7 +47,7 @@ class Session(
|
||||
var nextPatchIndex = 0
|
||||
|
||||
updateProgress(
|
||||
name = androidContext.getString(R.string.applying_patch, selectedPatches[nextPatchIndex]),
|
||||
name = androidContext.getString(R.string.executing_patch, selectedPatches[nextPatchIndex]),
|
||||
state = State.RUNNING
|
||||
)
|
||||
|
||||
@@ -56,7 +56,7 @@ class Session(
|
||||
|
||||
if (exception != null) {
|
||||
updateProgress(
|
||||
name = androidContext.getString(R.string.failed_to_apply_patch, patch.name),
|
||||
name = androidContext.getString(R.string.failed_to_execute_patch, patch.name),
|
||||
state = State.FAILED,
|
||||
message = exception.stackTraceToString()
|
||||
)
|
||||
@@ -72,7 +72,7 @@ class Session(
|
||||
|
||||
selectedPatches.getOrNull(nextPatchIndex)?.let { nextPatch ->
|
||||
updateProgress(
|
||||
name = androidContext.getString(R.string.applying_patch, nextPatch.name)
|
||||
name = androidContext.getString(R.string.executing_patch, nextPatch.name)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class Session(
|
||||
updateProgress(
|
||||
state = State.COMPLETED,
|
||||
name = androidContext.resources.getQuantityString(
|
||||
R.plurals.patches_applied,
|
||||
R.plurals.patches_executed,
|
||||
selectedPatches.size,
|
||||
selectedPatches.size
|
||||
)
|
||||
@@ -105,7 +105,6 @@ class Session(
|
||||
logger.info("Merging integrations")
|
||||
acceptIntegrations(integrations.toSet())
|
||||
acceptPatches(selectedPatches.toSet())
|
||||
updateProgress(state = State.COMPLETED) // Merging
|
||||
|
||||
logger.info("Applying patches...")
|
||||
applyPatchesVerbose(selectedPatches.sortedBy { it.name })
|
||||
|
||||
@@ -184,11 +184,11 @@ class PatcherWorker(
|
||||
Log.i(tag, "Patching succeeded".logFmt())
|
||||
Result.success()
|
||||
} catch (e: ProcessRuntime.RemoteFailureException) {
|
||||
Log.e(tag, "An exception occured in the remote process while patching. ${e.originalStackTrace}".logFmt())
|
||||
Log.e(tag, "An exception occurred in the remote process while patching. ${e.originalStackTrace}".logFmt())
|
||||
updateProgress(state = State.FAILED, message = e.originalStackTrace)
|
||||
Result.failure()
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "An exception occured while patching".logFmt(), e)
|
||||
Log.e(tag, "An exception occurred while patching".logFmt(), e)
|
||||
updateProgress(state = State.FAILED, message = e.stackTraceToString())
|
||||
Result.failure()
|
||||
} finally {
|
||||
|
||||
@@ -316,13 +316,9 @@ class PatcherViewModel(
|
||||
context.getString(R.string.patcher_step_unpack),
|
||||
StepCategory.PREPARING
|
||||
),
|
||||
Step(
|
||||
context.getString(R.string.patcher_step_integrations),
|
||||
StepCategory.PREPARING
|
||||
),
|
||||
|
||||
Step(
|
||||
context.getString(R.string.apply_patches),
|
||||
context.getString(R.string.execute_patches),
|
||||
StepCategory.PATCHING
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user