mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 22:56:48 +00:00
GODT-1388: Refactor Alternative routing
This commit is contained in:
@ -99,12 +99,8 @@ func (f *FrontendQt) toggleAutostart(makeItEnabled bool) {
|
||||
}
|
||||
|
||||
func (f *FrontendQt) toggleDoH(makeItEnabled bool) {
|
||||
if f.settings.GetBool(settings.AllowProxyKey) == makeItEnabled {
|
||||
f.qml.SetIsDoHEnabled(makeItEnabled)
|
||||
return
|
||||
}
|
||||
f.settings.SetBool(settings.AllowProxyKey, makeItEnabled)
|
||||
f.restart()
|
||||
f.bridge.SetProxyAllowed(makeItEnabled)
|
||||
f.qml.SetIsDoHEnabled(f.bridge.GetProxyAllowed())
|
||||
}
|
||||
|
||||
func (f *FrontendQt) toggleUseSSLforSMTP(makeItEnabled bool) {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build build_qt
|
||||
// +build build_qt
|
||||
|
||||
package qt
|
||||
@ -232,7 +233,7 @@ func (q *QMLBackend) setup(f *FrontendQt) {
|
||||
}()
|
||||
})
|
||||
|
||||
q.SetIsDoHEnabled(f.settings.GetBool(settings.AllowProxyKey))
|
||||
q.SetIsDoHEnabled(f.bridge.GetProxyAllowed())
|
||||
q.ConnectToggleDoH(f.toggleDoH)
|
||||
|
||||
q.SetUseSSLforSMTP(f.settings.GetBool(settings.SMTPSSLKey))
|
||||
|
||||
Reference in New Issue
Block a user