Remove the extra instances of the Settings object, and only use OnionShareGui.settings

This commit is contained in:
Micah Lee 2017-05-22 17:11:41 -07:00
parent 5846b06478
commit 444f50868d
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -225,10 +225,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.set_server_active(True)
# First, load settings and configure
settings = Settings()
settings.load()
self.app.set_stealth(settings.get('use_stealth'))
self.app.set_stealth(self.settings.get('use_stealth'))
# Reset web counters
web.download_count = 0
@ -245,10 +242,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.starting_server_error.emit(e.args[0])
return
# start onionshare http service in new thread
# First, load settings and configure
self.app.stay_open = not self.settings.get('close_after_first_download')
common.log('OnionShareGUI', 'stay_open', 'stay_open={}'.format(self.app.stay_open))
# start onionshare http service in new thread
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open))
t.daemon = True
t.start()