Default https if scheme is null

This commit is contained in:
J-Jamet
2022-02-18 15:27:49 +01:00
parent 739c938576
commit 3c1b010821

View File

@@ -160,7 +160,7 @@ class EntryInfo : NodeInfo {
} ?: searchInfo.webDomain?.let { webDomain -> } ?: searchInfo.webDomain?.let { webDomain ->
// If unable to save web domain in custom field or URL not populated, save in URL // If unable to save web domain in custom field or URL not populated, save in URL
val scheme = searchInfo.webScheme val scheme = searchInfo.webScheme
val webScheme = if (scheme.isNullOrEmpty()) "http" else scheme val webScheme = if (scheme.isNullOrEmpty()) "https" else scheme
val webDomainToStore = "$webScheme://$webDomain" val webDomainToStore = "$webScheme://$webDomain"
if (database?.allowEntryCustomFields() != true || url.isEmpty()) { if (database?.allowEntryCustomFields() != true || url.isEmpty()) {
url = webDomainToStore url = webDomainToStore