mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 16:27:13 +03:00
Only try login if output requested
This commit is contained in:
parent
95f96c1c03
commit
036b651980
@ -98,6 +98,7 @@ def prefsvarchanged():
|
||||
this.label['state'] = this.apikey_label['state'] = this.apikey['state'] = this.log.get() and this.log_button['state'] or tk.DISABLED
|
||||
|
||||
def prefs_changed(cmdr, is_beta):
|
||||
changed = config.getint('inara_out') != this.log.get()
|
||||
config.set('inara_out', this.log.get())
|
||||
|
||||
if cmdr and not is_beta:
|
||||
@ -107,7 +108,7 @@ def prefs_changed(cmdr, is_beta):
|
||||
if cmdr in cmdrs:
|
||||
idx = cmdrs.index(cmdr)
|
||||
apikeys.extend([''] * (1 + idx - len(apikeys)))
|
||||
changed = (apikeys[idx] != this.apikey.get().strip())
|
||||
changed |= (apikeys[idx] != this.apikey.get().strip())
|
||||
apikeys[idx] = this.apikey.get().strip()
|
||||
else:
|
||||
config.set('inara_cmdrs', cmdrs + [cmdr])
|
||||
@ -115,7 +116,7 @@ def prefs_changed(cmdr, is_beta):
|
||||
apikeys.append(this.apikey.get().strip())
|
||||
config.set('inara_apikeys', apikeys)
|
||||
|
||||
if changed:
|
||||
if this.log.get() and changed:
|
||||
this.newuser = True # Send basic info at next Journal event
|
||||
add_event('getCommanderProfile', time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()), { 'searchName': cmdr })
|
||||
call()
|
||||
|
Loading…
x
Reference in New Issue
Block a user