fixed protocol reloads old value in settings page

This commit is contained in:
ronoaer 2023-09-08 21:31:47 +08:00
parent fdff57da7c
commit 85414eb65f
5 changed files with 22 additions and 4 deletions

View file

@ -91,7 +91,15 @@ PageType {
textField.onEditingFinished: {
if (textFieldText !== site) {
site = textFieldText
var tmpText = textFieldText
tmpText = tmpText.toLocaleLowerCase()
var indexHttps = tmpText.indexOf("https://")
if (indexHttps === 0) {
tmpText = textFieldText.substring(8)
} else {
site = textFieldText
}
}
}
}