GODT-1251: Fix change SMTP settings

This commit is contained in:
Alexander Bilyak
2021-11-03 12:10:05 +00:00
committed by Jakub
parent a93a8e7be9
commit 5637ca2529
2 changed files with 6 additions and 7 deletions

View File

@ -84,6 +84,8 @@ SettingsView {
submitButton.loading = true submitButton.loading = true
root.submit() root.submit()
} }
enabled: sslButton.checked !== root.backend.useSSLforSMTP
} }
Button { Button {
@ -100,10 +102,6 @@ SettingsView {
} }
} }
onBack: {
root.setDefaultValues()
}
function submit(){ function submit(){
submitButton.loading = true submitButton.loading = true
root.backend.toggleUseSSLforSMTP(sslButton.checked) root.backend.toggleUseSSLforSMTP(sslButton.checked)
@ -114,6 +112,7 @@ SettingsView {
starttlsButton.checked = !root.backend.useSSLforSMTP starttlsButton.checked = !root.backend.useSSLforSMTP
} }
onVisibleChanged: {
Component.onCompleted: root.setDefaultValues() root.setDefaultValues()
}
} }

View File

@ -108,7 +108,7 @@ func (f *FrontendQt) toggleUseSSLforSMTP(makeItEnabled bool) {
f.qml.SetUseSSLforSMTP(makeItEnabled) f.qml.SetUseSSLforSMTP(makeItEnabled)
return return
} }
f.settings.SetBool(settings.SMTPPortKey, makeItEnabled) f.settings.SetBool(settings.SMTPSSLKey, makeItEnabled)
f.restart() f.restart()
} }