mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-02 14:54:25 +02:00
feat: Use simpler wording
This commit is contained in:
parent
3a88d4d3e6
commit
d8eadc2a2d
@ -330,7 +330,7 @@ class MainActivity : FlutterActivity() {
|
|||||||
val stack = ex.stackTraceToString()
|
val stack = ex.stackTraceToString()
|
||||||
updateProgress(
|
updateProgress(
|
||||||
-100.0,
|
-100.0,
|
||||||
"Aborted",
|
"Failed",
|
||||||
"An error occurred:\n$stack"
|
"An error occurred:\n$stack"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -131,9 +131,6 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> runPatcher() async {
|
Future<void> runPatcher() async {
|
||||||
try {
|
|
||||||
update(0.0, 'Initializing...', 'Initializing installer');
|
|
||||||
if (_patches.isNotEmpty) {
|
|
||||||
try {
|
try {
|
||||||
update(0.1, '', 'Creating working directory');
|
update(0.1, '', 'Creating working directory');
|
||||||
await _patcherAPI.runPatcher(
|
await _patcherAPI.runPatcher(
|
||||||
@ -144,16 +141,15 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
update(
|
update(
|
||||||
-100.0,
|
-100.0,
|
||||||
'Aborted...',
|
'Failed...',
|
||||||
'An error occurred! Aborted\nError:\n$e',
|
'Something went wrong:\n$e',
|
||||||
);
|
);
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(e);
|
print(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
update(-100.0, 'Aborted...', 'No app or patches selected! Aborted');
|
try {
|
||||||
}
|
|
||||||
if (FlutterBackground.isBackgroundExecutionEnabled) {
|
if (FlutterBackground.isBackgroundExecutionEnabled) {
|
||||||
try {
|
try {
|
||||||
FlutterBackground.disableBackgroundExecution();
|
FlutterBackground.disableBackgroundExecution();
|
||||||
@ -211,7 +207,8 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
),
|
),
|
||||||
RadioListTile(
|
RadioListTile(
|
||||||
title: I18nText('installerView.installNonRootType'),
|
title: I18nText('installerView.installNonRootType'),
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16),
|
contentPadding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 16),
|
||||||
value: 0,
|
value: 0,
|
||||||
groupValue: value,
|
groupValue: value,
|
||||||
onChanged: (selected) {
|
onChanged: (selected) {
|
||||||
@ -220,7 +217,8 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
),
|
),
|
||||||
RadioListTile(
|
RadioListTile(
|
||||||
title: I18nText('installerView.installRootType'),
|
title: I18nText('installerView.installRootType'),
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16),
|
contentPadding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 16),
|
||||||
value: 1,
|
value: 1,
|
||||||
groupValue: value,
|
groupValue: value,
|
||||||
onChanged: (selected) {
|
onChanged: (selected) {
|
||||||
@ -258,9 +256,9 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
Future<void> stopPatcher() async {
|
Future<void> stopPatcher() async {
|
||||||
try {
|
try {
|
||||||
isCanceled = true;
|
isCanceled = true;
|
||||||
update(0.5, 'Aborting...', 'Canceling patching process');
|
update(0.5, 'Canceling...', 'Canceling patching process');
|
||||||
await _patcherAPI.stopPatcher();
|
await _patcherAPI.stopPatcher();
|
||||||
update(-100.0, 'Aborted...', 'Press back to exit');
|
update(-100.0, 'Canceled...', 'Press back to exit');
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(e);
|
print(e);
|
||||||
@ -286,7 +284,8 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
// In case a patch changed the app name or package name,
|
// In case a patch changed the app name or package name,
|
||||||
// update the app info.
|
// update the app info.
|
||||||
final app = await DeviceApps.getAppFromStorage(_patcherAPI.outFile!.path);
|
final app =
|
||||||
|
await DeviceApps.getAppFromStorage(_patcherAPI.outFile!.path);
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
_app.name = app.appName;
|
_app.name = app.appName;
|
||||||
_app.packageName = app.packageName;
|
_app.packageName = app.packageName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user