mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Don't use 'BuildContext's across async gaps.
(#1148)
This commit is contained in:
parent
6f9ab232ae
commit
fc8a4fc5b6
@ -90,13 +90,17 @@ class AppSelectorViewModel extends BaseViewModel {
|
|||||||
await DeviceApps.getApp(packageName, true) as ApplicationWithIcon?;
|
await DeviceApps.getApp(packageName, true) as ApplicationWithIcon?;
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
if (await checkSplitApk(packageName) && !isRooted) {
|
if (await checkSplitApk(packageName) && !isRooted) {
|
||||||
|
if (context.mounted) {
|
||||||
return showSelectFromStorageDialog(context);
|
return showSelectFromStorageDialog(context);
|
||||||
|
}
|
||||||
} else if (!await checkSplitApk(packageName) || isRooted) {
|
} else if (!await checkSplitApk(packageName) || isRooted) {
|
||||||
selectApp(app);
|
selectApp(app);
|
||||||
|
if (context.mounted) {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future showSelectFromStorageDialog(BuildContext context) async {
|
Future showSelectFromStorageDialog(BuildContext context) async {
|
||||||
return showDialog(
|
return showDialog(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user