mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 05:23:28 +01:00 
			
		
		
		
	Compare commits
	
		
			8 Commits
		
	
	
		
			v0.15.2-be
			...
			v0.15.3-be
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 4f42b5a3ee | ||
|  | 5d9645eaff | ||
|  | c032808d82 | ||
|  | 282c94266e | ||
|  | e2f7d52bee | ||
|  | 6317f0162a | ||
|  | 436a6310d7 | ||
|  | 70fcfc1753 | 
| @@ -10,7 +10,7 @@ class APKCombo extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/+[^/]+/+[^/]+'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host/+[^/]+/+[^/]+'); | ||||||
|     var match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     var match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ class APKPure extends AppSource { | |||||||
|       url = 'https://$host${Uri.parse(url).path}'; |       url = 'https://$host${Uri.parse(url).path}'; | ||||||
|     } |     } | ||||||
|     RegExp standardUrlRegExA = |     RegExp standardUrlRegExA = | ||||||
|         RegExp('^https?://$host/+[^/]+/+[^/]+(/+[^/]+)?'); |         RegExp('^https?://(www\\.)?$host/+[^/]+/+[^/]+(/+[^/]+)?'); | ||||||
|     match = standardUrlRegExA.firstMatch(url.toLowerCase()); |     match = standardUrlRegExA.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ class Codeberg extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/[^/]+/[^/]+'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host/[^/]+/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -38,13 +38,14 @@ class FDroid extends AppSource { | |||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegExB = |     RegExp standardUrlRegExB = | ||||||
|         RegExp('^https?://$host/+[^/]+/+packages/+[^/]+'); |         RegExp('^https?://(www\\.)?$host/+[^/]+/+packages/+[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); | ||||||
|     if (match != null) { |     if (match != null) { | ||||||
|       url = |       url = | ||||||
|           'https://${Uri.parse(url.substring(0, match.end)).host}/packages/${Uri.parse(url).pathSegments.last}'; |           'https://${Uri.parse(url.substring(0, match.end)).host}/packages/${Uri.parse(url).pathSegments.last}'; | ||||||
|     } |     } | ||||||
|     RegExp standardUrlRegExA = RegExp('^https?://$host/+packages/+[^/]+'); |     RegExp standardUrlRegExA = | ||||||
|  |         RegExp('^https?://(www\\.)?$host/+packages/+[^/]+'); | ||||||
|     match = standardUrlRegExA.firstMatch(url.toLowerCase()); |     match = standardUrlRegExA.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -149,7 +149,7 @@ class GitHub extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/[^/]+/[^/]+'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host/[^/]+/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -52,7 +52,7 @@ class GitLab extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/[^/]+/[^/]+'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host/[^/]+/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ class HuaweiAppGallery extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/app/[^/]+'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host/app/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ class Mullvad extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -10,7 +10,8 @@ class NeutronCode extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/downloads/file/[^/]+'); |     RegExp standardUrlRegEx = | ||||||
|  |         RegExp('^https?://(www\\.)?$host/downloads/file/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -10,13 +10,14 @@ class SourceForge extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegExB = RegExp('^https?://$host/p/[^/]+'); |     RegExp standardUrlRegExB = RegExp('^https?://(www\\.)?$host/p/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); | ||||||
|     if (match != null) { |     if (match != null) { | ||||||
|       url = |       url = | ||||||
|           'https://${Uri.parse(url.substring(0, match.end)).host}/projects/${url.substring(Uri.parse(url.substring(0, match.end)).host.length + '/projects/'.length + 1)}'; |           'https://${Uri.parse(url.substring(0, match.end)).host}/projects/${url.substring(Uri.parse(url.substring(0, match.end)).host.length + '/projects/'.length + 1)}'; | ||||||
|     } |     } | ||||||
|     RegExp standardUrlRegExA = RegExp('^https?://$host/projects/[^/]+'); |     RegExp standardUrlRegExA = | ||||||
|  |         RegExp('^https?://(www\\.)?$host/projects/[^/]+'); | ||||||
|     match = standardUrlRegExA.firstMatch(url.toLowerCase()); |     match = standardUrlRegExA.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ class SourceHut extends AppSource { | |||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   String sourceSpecificStandardizeURL(String url) { |   String sourceSpecificStandardizeURL(String url) { | ||||||
|     RegExp standardUrlRegEx = RegExp('^https?://$host/[^/]+/[^/]+'); |     RegExp standardUrlRegEx = RegExp('^https?://(www\\.)?$host/[^/]+/[^/]+'); | ||||||
|     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); |     RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); | ||||||
|     if (match == null) { |     if (match == null) { | ||||||
|       throw InvalidURLError(name); |       throw InvalidURLError(name); | ||||||
|   | |||||||
| @@ -6,6 +6,8 @@ import 'package:obtainium/providers/source_provider.dart'; | |||||||
| class WhatsApp extends AppSource { | class WhatsApp extends AppSource { | ||||||
|   WhatsApp() { |   WhatsApp() { | ||||||
|     host = 'whatsapp.com'; |     host = 'whatsapp.com'; | ||||||
|  |     overrideVersionDetectionFormDefault('noVersionDetection', | ||||||
|  |         disableStandard: true, disableRelDate: true); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart'; | |||||||
| // ignore: implementation_imports | // ignore: implementation_imports | ||||||
| import 'package:easy_localization/src/localization.dart'; | import 'package:easy_localization/src/localization.dart'; | ||||||
|  |  | ||||||
| const String currentVersion = '0.15.2'; | const String currentVersion = '0.15.3'; | ||||||
| const String currentReleaseTag = | const String currentReleaseTag = | ||||||
|     'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES |     'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES | ||||||
|  |  | ||||||
| @@ -152,7 +152,6 @@ class _ObtainiumState extends State<Obtainium> { | |||||||
|             requiresStorageNotLow: false, |             requiresStorageNotLow: false, | ||||||
|             requiresDeviceIdle: false, |             requiresDeviceIdle: false, | ||||||
|             requiredNetworkType: NetworkType.ANY), (String taskId) async { |             requiredNetworkType: NetworkType.ANY), (String taskId) async { | ||||||
|       // We don't want periodic tasks in the foreground - ignore |  | ||||||
|       await bgUpdateCheck(taskId, null); |       await bgUpdateCheck(taskId, null); | ||||||
|       BackgroundFetch.finish(taskId); |       BackgroundFetch.finish(taskId); | ||||||
|     }, (String taskId) async { |     }, (String taskId) async { | ||||||
|   | |||||||
| @@ -286,10 +286,14 @@ class AddAppPageState extends State<AddAppPage> { | |||||||
|                     selectedByDefault: true, |                     selectedByDefault: true, | ||||||
|                     onlyOneSelectionAllowed: false, |                     onlyOneSelectionAllowed: false, | ||||||
|                     titlesAreLinks: false, |                     titlesAreLinks: false, | ||||||
|  |                     deselectThese: settingsProvider.searchDeselected, | ||||||
|                   ); |                   ); | ||||||
|                 }) ?? |                 }) ?? | ||||||
|             []; |             []; | ||||||
|         if (searchSources.isNotEmpty) { |         if (searchSources.isNotEmpty) { | ||||||
|  |           settingsProvider.searchDeselected = sourceStrings.keys | ||||||
|  |               .where((s) => !searchSources.contains(s)) | ||||||
|  |               .toList(); | ||||||
|           var results = await Future.wait(sourceProvider.sources |           var results = await Future.wait(sourceProvider.sources | ||||||
|               .where((e) => searchSources.contains(e.name)) |               .where((e) => searchSources.contains(e.name)) | ||||||
|               .map((e) async { |               .map((e) async { | ||||||
| @@ -306,7 +310,6 @@ class AddAppPageState extends State<AddAppPage> { | |||||||
|             } |             } | ||||||
|           })); |           })); | ||||||
|  |  | ||||||
|           // .then((results) async { |  | ||||||
|           // Interleave results instead of simple reduce |           // Interleave results instead of simple reduce | ||||||
|           Map<String, List<String>> res = {}; |           Map<String, List<String>> res = {}; | ||||||
|           var si = 0; |           var si = 0; | ||||||
|   | |||||||
| @@ -604,11 +604,13 @@ class SelectionModal extends StatefulWidget { | |||||||
|       this.selectedByDefault = true, |       this.selectedByDefault = true, | ||||||
|       this.onlyOneSelectionAllowed = false, |       this.onlyOneSelectionAllowed = false, | ||||||
|       this.titlesAreLinks = true, |       this.titlesAreLinks = true, | ||||||
|       this.title}); |       this.title, | ||||||
|  |       this.deselectThese = const []}); | ||||||
|  |  | ||||||
|   String? title; |   String? title; | ||||||
|   Map<String, List<String>> entries; |   Map<String, List<String>> entries; | ||||||
|   bool selectedByDefault; |   bool selectedByDefault; | ||||||
|  |   List<String> deselectThese; | ||||||
|   bool onlyOneSelectionAllowed; |   bool onlyOneSelectionAllowed; | ||||||
|   bool titlesAreLinks; |   bool titlesAreLinks; | ||||||
|  |  | ||||||
| @@ -622,9 +624,13 @@ class _SelectionModalState extends State<SelectionModal> { | |||||||
|   @override |   @override | ||||||
|   void initState() { |   void initState() { | ||||||
|     super.initState(); |     super.initState(); | ||||||
|     for (var url in widget.entries.entries) { |     for (var entry in widget.entries.entries) { | ||||||
|       entrySelections.putIfAbsent(url, |       entrySelections.putIfAbsent( | ||||||
|           () => widget.selectedByDefault && !widget.onlyOneSelectionAllowed); |           entry, | ||||||
|  |           () => | ||||||
|  |               widget.selectedByDefault && | ||||||
|  |               !widget.onlyOneSelectionAllowed && | ||||||
|  |               !widget.deselectThese.contains(entry.key)); | ||||||
|     } |     } | ||||||
|     if (widget.selectedByDefault && widget.onlyOneSelectionAllowed) { |     if (widget.selectedByDefault && widget.onlyOneSelectionAllowed) { | ||||||
|       selectOnlyOne(widget.entries.entries.first.key); |       selectOnlyOne(widget.entries.entries.first.key); | ||||||
|   | |||||||
| @@ -446,4 +446,13 @@ class SettingsProvider with ChangeNotifier { | |||||||
|     prefs?.setBool('parallelDownloads', val); |     prefs?.setBool('parallelDownloads', val); | ||||||
|     notifyListeners(); |     notifyListeners(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   List<String> get searchDeselected { | ||||||
|  |     return prefs?.getStringList('searchDeselected') ?? []; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   set searchDeselected(List<String> list) { | ||||||
|  |     prefs?.setStringList('searchDeselected', list); | ||||||
|  |     notifyListeners(); | ||||||
|  |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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 | # 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 | # 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. | # of the product and file versions while build-number is used as the build suffix. | ||||||
| version: 0.15.2+238 # When changing this, update the tag in main() accordingly | version: 0.15.3+239 # When changing this, update the tag in main() accordingly | ||||||
|  |  | ||||||
| environment: | environment: | ||||||
|   sdk: '>=3.0.0 <4.0.0' |   sdk: '>=3.0.0 <4.0.0' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user