Skip to content

Commit

Permalink
fix: fix armv7 dialog shown for x86, x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunali321 committed May 6, 2023
1 parent 3fe5882 commit 170fc53
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/ui/views/patcher/patcher_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@ class PatcherViewModel extends BaseViewModel {
}

Future<void> 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<String> 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,
Expand Down

0 comments on commit 170fc53

Please sign in to comment.