From 0c97b25d99bf434aa468b255d7d4e11488042c5f Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Fri, 23 Dec 2022 23:52:32 -0500 Subject: [PATCH] Track-only source bugfix + better http errors + increment version --- lib/app_sources/apkmirror.dart | 2 +- lib/app_sources/fdroid.dart | 2 +- lib/app_sources/fdroidrepo.dart | 2 +- lib/app_sources/gitlab.dart | 2 +- lib/app_sources/mullvad.dart | 2 +- lib/app_sources/signal.dart | 2 +- lib/app_sources/sourceforge.dart | 2 +- lib/app_sources/steammobile.dart | 2 +- lib/main.dart | 2 +- lib/providers/source_provider.dart | 4 ++-- pubspec.yaml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/app_sources/apkmirror.dart b/lib/app_sources/apkmirror.dart index ac0b527..d583bbb 100644 --- a/lib/app_sources/apkmirror.dart +++ b/lib/app_sources/apkmirror.dart @@ -46,7 +46,7 @@ class APKMirror extends AppSource { } return APKDetails(version, [], getAppNames(standardUrl)); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } diff --git a/lib/app_sources/fdroid.dart b/lib/app_sources/fdroid.dart index f5493a8..01f9293 100644 --- a/lib/app_sources/fdroid.dart +++ b/lib/app_sources/fdroid.dart @@ -54,7 +54,7 @@ class FDroid extends AppSource { return APKDetails(latestVersion, apkUrls, AppNames(name, Uri.parse(standardUrl).pathSegments.last)); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } diff --git a/lib/app_sources/fdroidrepo.dart b/lib/app_sources/fdroidrepo.dart index 0e9a7f7..cffe307 100644 --- a/lib/app_sources/fdroidrepo.dart +++ b/lib/app_sources/fdroidrepo.dart @@ -80,7 +80,7 @@ class FDroidRepo extends AppSource { .toList(); return APKDetails(latestVersion, apkUrls, AppNames(authorName, appName)); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } } diff --git a/lib/app_sources/gitlab.dart b/lib/app_sources/gitlab.dart index dedd7d8..b9bef9b 100644 --- a/lib/app_sources/gitlab.dart +++ b/lib/app_sources/gitlab.dart @@ -59,7 +59,7 @@ class GitLab extends AppSource { } return APKDetails(version, apkUrls, GitHub().getAppNames(standardUrl)); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } } diff --git a/lib/app_sources/mullvad.dart b/lib/app_sources/mullvad.dart index 6700ec2..0d8fed9 100644 --- a/lib/app_sources/mullvad.dart +++ b/lib/app_sources/mullvad.dart @@ -43,7 +43,7 @@ class Mullvad extends AppSource { ['https://mullvad.net/download/app/apk/latest'], AppNames(name, 'Mullvad-VPN')); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } } diff --git a/lib/app_sources/signal.dart b/lib/app_sources/signal.dart index e0aa618..ad3c7b9 100644 --- a/lib/app_sources/signal.dart +++ b/lib/app_sources/signal.dart @@ -33,7 +33,7 @@ class Signal extends AppSource { } return APKDetails(version, apkUrls, AppNames(name, 'Signal')); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } } diff --git a/lib/app_sources/sourceforge.dart b/lib/app_sources/sourceforge.dart index e258a3a..2c80838 100644 --- a/lib/app_sources/sourceforge.dart +++ b/lib/app_sources/sourceforge.dart @@ -57,7 +57,7 @@ class SourceForge extends AppSource { AppNames( name, standardUrl.substring(standardUrl.lastIndexOf('/') + 1))); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } } diff --git a/lib/app_sources/steammobile.dart b/lib/app_sources/steammobile.dart index 3eed148..dacc088 100644 --- a/lib/app_sources/steammobile.dart +++ b/lib/app_sources/steammobile.dart @@ -54,7 +54,7 @@ class SteamMobile extends AppSource { var apkUrls = [links[0]]; return APKDetails(version, apkUrls, AppNames(name, apks[apkNamePrefix]!)); } else { - throw NoReleasesError(); + throw getObtainiumHttpError(res); } } } diff --git a/lib/main.dart b/lib/main.dart index 16a8576..2e6693f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart'; // ignore: implementation_imports import 'package:easy_localization/src/localization.dart'; -const String currentVersion = '0.9.6'; +const String currentVersion = '0.9.7'; const String currentReleaseTag = 'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 83fd05b..fc2faaa 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -331,13 +331,13 @@ class SourceProvider { {App? currentApp, bool trackOnlyOverride = false, noVersionDetectionOverride = false}) async { - if (trackOnlyOverride) { + if (trackOnlyOverride || source.enforceTrackOnly) { additionalSettings['trackOnly'] = true; } if (noVersionDetectionOverride) { additionalSettings['noVersionDetection'] = true; } - var trackOnly = currentApp?.additionalSettings['trackOnly'] == true; + var trackOnly = additionalSettings['trackOnly'] == true; String standardUrl = source.standardizeURL(preStandardizeUrl(url)); APKDetails apk = await source.getLatestAPKDetails(standardUrl, additionalSettings); diff --git a/pubspec.yaml b/pubspec.yaml index 8612644..98ba8d8 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.9.6+94 # When changing this, update the tag in main() accordingly +version: 0.9.7+95 # When changing this, update the tag in main() accordingly environment: sdk: '>=2.18.2 <3.0.0'