mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-11 02:45:03 -04:00
When settings change, only start the timer if a mode has been selected
This commit is contained in:
parent
41071ff44d
commit
b473744d26
1 changed files with 3 additions and 8 deletions
|
@ -377,12 +377,7 @@ class Tab(QtWidgets.QWidget):
|
||||||
self.get_mode().handle_tor_broke()
|
self.get_mode().handle_tor_broke()
|
||||||
|
|
||||||
# Process events from the web object
|
# Process events from the web object
|
||||||
if self.mode == self.common.gui.MODE_SHARE:
|
mode = self.get_mode()
|
||||||
mode = self.share_mode
|
|
||||||
elif self.mode == self.common.gui.MODE_WEBSITE:
|
|
||||||
mode = self.website_mode
|
|
||||||
else:
|
|
||||||
mode = self.receive_mode
|
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
|
@ -499,10 +494,10 @@ class Tab(QtWidgets.QWidget):
|
||||||
# settings, we probably succeeded in obtaining a new connection. If so, restart the timer.
|
# settings, we probably succeeded in obtaining a new connection. If so, restart the timer.
|
||||||
if not self.common.gui.local_only:
|
if not self.common.gui.local_only:
|
||||||
if self.common.gui.onion.is_authenticated():
|
if self.common.gui.onion.is_authenticated():
|
||||||
if not self.timer.isActive():
|
|
||||||
self.timer.start(500)
|
|
||||||
mode = self.get_mode()
|
mode = self.get_mode()
|
||||||
if mode:
|
if mode:
|
||||||
|
if not self.timer.isActive():
|
||||||
|
self.timer.start(500)
|
||||||
mode.on_reload_settings()
|
mode.on_reload_settings()
|
||||||
|
|
||||||
def close_tab(self):
|
def close_tab(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue