Bugfixes for F-Droid repo search (#1681)

This commit is contained in:
Imran Remtulla
2024-06-28 21:55:13 -04:00
parent 105e70a814
commit dff1b4cf39
3 changed files with 5 additions and 2 deletions

View File

@@ -163,6 +163,7 @@ class FDroidRepo extends AppSource {
if (appIdOrName == null) {
throw NoReleasesError();
}
additionalSettings['appIdOrName'] = appIdOrName;
var res =
await sourceRequestWithURLVariants(standardUrl, additionalSettings);
if (res.statusCode == 200) {

View File

@@ -399,7 +399,7 @@ class AddAppPageState extends State<AddAppPage> {
[
GeneratedFormDropdown(
'overrideSource',
defaultValue: '',
defaultValue: pickedSourceOverride ?? '',
[
MapEntry('', tr('none')),
...sourceProvider.sources.map(

View File

@@ -354,7 +354,9 @@ preStandardizeUrl(String url) {
url.toLowerCase().indexOf('https://') != 0) {
url = 'https://$url';
}
var trailingSlash = Uri.tryParse(url)?.path.endsWith('/') ?? false;
var uri = Uri.tryParse(url);
var trailingSlash = (uri?.path.endsWith('/') ?? false) &&
(uri?.queryParameters.isEmpty ?? false);
url = url
.split('/')
.where((e) => e.isNotEmpty)