HTML intermediate link bugfix (#1211)

This commit is contained in:
Imran Remtulla
2023-12-29 13:39:56 -05:00
parent bfe09791d5
commit 9935cb482e

View File

@@ -147,7 +147,7 @@ appJSONCompatibilityModifiers(Map<String, dynamic> json) {
}
// HTML single 'intermediate link' should be converted to multi-support version
if (originalAdditionalSettings['intermediateLinkRegex'] != null &&
additionalSettings['intermediateLink']?.isNotEmpty != true) {
additionalSettings['intermediateLinkRegex']?.isNotEmpty != true) {
additionalSettings['intermediateLink'] = [
{
'customLinkFilterRegex':
@@ -157,6 +157,12 @@ appJSONCompatibilityModifiers(Map<String, dynamic> json) {
}
];
}
if ((additionalSettings['intermediateLink']?.length ?? 0) > 0) {
additionalSettings['intermediateLink'] =
additionalSettings['intermediateLink'].where((e) {
return e['intermediateLinkRegex']?.isNotEmpty == true;
}).toList();
}
}
json['additionalSettings'] = jsonEncode(additionalSettings);
// F-Droid no longer needs cloudflare exception since override can be used - migrate apps appropriately