mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: Add missing confirmation dialog
This commit is contained in:
parent
48a739c94e
commit
7a1ba9dabf
@ -308,6 +308,7 @@
|
|||||||
"rootDialogTitle": "Error",
|
"rootDialogTitle": "Error",
|
||||||
|
|
||||||
"unpatchDialogText": "Are you sure you want to unpatch this app?",
|
"unpatchDialogText": "Are you sure you want to unpatch this app?",
|
||||||
|
"uninstallDialogText": "Are you sure you want to uninstall this app?",
|
||||||
"rootDialogText": "App was installed with superuser permissions, but currently ReVanced Manager has no permissions.\nPlease grant superuser permissions first.",
|
"rootDialogText": "App was installed with superuser permissions, but currently ReVanced Manager has no permissions.\nPlease grant superuser permissions first.",
|
||||||
|
|
||||||
"packageNameLabel": "Package name",
|
"packageNameLabel": "Package name",
|
||||||
|
@ -28,6 +28,7 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
var isUninstalled = onlyUnpatch;
|
var isUninstalled = onlyUnpatch;
|
||||||
|
|
||||||
if (!onlyUnpatch) {
|
if (!onlyUnpatch) {
|
||||||
|
// TODO(Someone): Wait for the app to uninstall successfully.
|
||||||
isUninstalled = await DeviceApps.uninstallApp(app.packageName);
|
isUninstalled = await DeviceApps.uninstallApp(app.packageName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
),
|
),
|
||||||
FilledButton(
|
FilledButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
uninstallApp(context, app, onlyUnpatch);
|
uninstallApp(context, app, true);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
@ -101,8 +102,31 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
uninstallApp(context, app, onlyUnpatch);
|
return showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: I18nText(
|
||||||
|
'appInfoView.uninstallButton',
|
||||||
|
),
|
||||||
|
content: I18nText(
|
||||||
|
'appInfoView.uninstallDialogText',
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
child: I18nText('noButton'),
|
||||||
|
),
|
||||||
|
FilledButton(
|
||||||
|
onPressed: () {
|
||||||
|
uninstallApp(context, app, false);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
child: I18nText('yesButton'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user