mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
feat: add continue anyway button to select from storage dialog (#810)
This commit is contained in:
parent
7230152ab8
commit
affba669ce
3 changed files with 20 additions and 1 deletions
|
@ -74,6 +74,7 @@
|
|||
"viewTitle": "Select an application",
|
||||
"searchBarHint": "Search applications",
|
||||
"selectFromStorageButton": "Select from storage",
|
||||
"continueAnywayButton": "Continue anyway",
|
||||
"storageButton": "Storage",
|
||||
"errorMessage": "Unable to use selected application",
|
||||
"downloadToast": "Download function is not available yet",
|
||||
|
|
|
@ -116,6 +116,7 @@ class _AppSelectorViewState extends State<AppSelectorView> {
|
|||
)
|
||||
: model.showSelectFromStorageDialog(
|
||||
context,
|
||||
app,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -78,7 +78,8 @@ class AppSelectorViewModel extends BaseViewModel {
|
|||
locator<PatcherViewModel>().loadLastSelectedPatches();
|
||||
}
|
||||
|
||||
Future showSelectFromStorageDialog(BuildContext context) async {
|
||||
Future showSelectFromStorageDialog(
|
||||
BuildContext context, ApplicationWithIcon app) async {
|
||||
return showDialog(
|
||||
context: context,
|
||||
builder: (context) => SimpleDialog(
|
||||
|
@ -132,6 +133,22 @@ class AppSelectorViewModel extends BaseViewModel {
|
|||
],
|
||||
),
|
||||
),
|
||||
CustomMaterialButton(
|
||||
isFilled: false,
|
||||
onPressed: () => selectApp(app).then(
|
||||
(_) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
label: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(width: 10),
|
||||
I18nText('appSelectorView.continueAnywayButton'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue