Only show bridge error if connection type is bundled

This commit is contained in:
Micah Lee 2021-10-24 20:03:19 -07:00
parent f784870c76
commit e6c7cc989f
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 10 additions and 3 deletions

View File

@ -199,8 +199,6 @@ class Onion(object):
)
return
self.common.log("Onion", "connect")
# Either use settings that are passed in, or use them from common
if custom_settings:
self.settings = custom_settings
@ -211,6 +209,12 @@ class Onion(object):
self.common.load_settings()
self.settings = self.common.settings
self.common.log(
"Onion",
"connect",
f"connection_type={self.settings.get('connection_type')}",
)
# The Tor controller
self.c = None

View File

@ -799,7 +799,10 @@ class TorSettingsTab(QtWidgets.QWidget):
settings.set("tor_bridges_use_moat", True)
moat_bridges = self.bridge_moat_textbox.toPlainText()
if moat_bridges.strip() == "":
if (
self.connection_type_bundled_radio.isChecked()
and moat_bridges.strip() == ""
):
self.error_label.setText(
strings._("gui_settings_moat_bridges_invalid")
)