From 481204665c83248eee9966652b08ef05d9fdc4fe Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Wed, 14 Dec 2022 19:10:05 -0500 Subject: [PATCH] Workaround for version detection error in BG --- lib/providers/apps_provider.dart | 8 ++++++-- pubspec.yaml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index 057e2bc..278794d 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -428,8 +428,12 @@ class AppsProvider with ChangeNotifier { } Future doesInstalledAppsPluginWork() async { - bool res = - (await InstalledApps.getAppInfo(obtainiumId)).versionName != null; + bool res = false; + try { + res = (await InstalledApps.getAppInfo(obtainiumId)).versionName != null; + } catch (e) { + // + } if (!res) { logs.add(tr('versionCorrectionDisabled')); } diff --git a/pubspec.yaml b/pubspec.yaml index cbdc5c7..1d95940 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.8.10+73 # When changing this, update the tag in main() accordingly +version: 0.8.10+74 # When changing this, update the tag in main() accordingly environment: sdk: '>=2.18.2 <3.0.0'