From 170fc537acb195eca74b2857ed93663275e134de Mon Sep 17 00:00:00 2001 From: Aunali321 Date: Sun, 7 May 2023 04:14:57 +0530 Subject: [PATCH] fix: fix armv7 dialog shown for x86, x86_64 --- lib/ui/views/patcher/patcher_viewmodel.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ui/views/patcher/patcher_viewmodel.dart b/lib/ui/views/patcher/patcher_viewmodel.dart index 06ead03cee..e7dffdcb5a 100644 --- a/lib/ui/views/patcher/patcher_viewmodel.dart +++ b/lib/ui/views/patcher/patcher_viewmodel.dart @@ -86,13 +86,11 @@ class PatcherViewModel extends BaseViewModel { } Future showArmv7WarningDialog(BuildContext context) async { - final bool armv7 = await AboutInfo.getInfo().then( - (info) => - info['arch'] != null && - info['arch']!.contains('armeabi-v7a') && - !info['arch']!.contains('arm64-v8a'), - ); - + final bool armv7 = await AboutInfo.getInfo().then((info) { + final List archs = info['arch']; + final supportedAbis = ['arm64-v8a', 'x86', 'x86_64']; + return !archs.any((arch) => supportedAbis.contains(arch)); + }); if (context.mounted && armv7) { return showDialog( context: context,