get settings from self rather than instantiate a new Settings object

This commit is contained in:
Miguel Jacq 2017-05-23 09:15:52 +10:00
parent f446f6630d
commit 13a2ad2147
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6

View file

@ -221,9 +221,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
# start onionshare http service in new thread
# First, load settings and configure
settings = Settings()
settings.load()
self.app.stay_open = not settings.get('close_after_first_download')
self.app.stay_open = not self.settings.get('close_after_first_download')
common.log('OnionShareGUI', 'stay_open', 'stay_open={}'.format(self.app.stay_open))
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open))
t.daemon = True