Attempt to improve load times again + link parsing bugfix (#1625)

This commit is contained in:
Imran Remtulla
2024-05-23 19:35:52 -04:00
parent de509737e6
commit 06a079e452
2 changed files with 37 additions and 15 deletions

View File

@@ -354,11 +354,13 @@ preStandardizeUrl(String url) {
url.toLowerCase().indexOf('https://') != 0) {
url = 'https://$url';
}
var trailingSlash = Uri.tryParse(url)?.path.endsWith('/') ?? false;
url = url
.split('/')
.where((e) => e.isNotEmpty)
.join('/')
.replaceFirst(':/', '://');
.split('/')
.where((e) => e.isNotEmpty)
.join('/')
.replaceFirst(':/', '://') +
(trailingSlash ? '/' : '');
return url;
}
@@ -523,8 +525,7 @@ abstract class AppSource {
[GeneratedFormTextField('appName', label: tr('appName'), required: false)],
[
GeneratedFormSwitch('shizukuPretendToBeGooglePlay',
label: tr('shizukuPretendToBeGooglePlay'),
defaultValue: false)
label: tr('shizukuPretendToBeGooglePlay'), defaultValue: false)
],
[
GeneratedFormSwitch('exemptFromBackgroundUpdates',