1
0

Qt: set history_rates both through settings_dialog and history_list

follow-up 503776c0de
This commit is contained in:
ThomasV
2023-03-16 16:48:12 +01:00
parent 3a7bc82881
commit 7207f13e97
3 changed files with 18 additions and 10 deletions

View File

@@ -597,9 +597,12 @@ class FxThread(ThreadJob, EventListener):
self.config.set_key('use_exchange_rate', bool(b))
self.trigger_update()
def has_history(self):
def can_have_history(self):
return self.is_enabled() and self.ccy in self.exchange.history_ccys()
def has_history(self):
return self.can_have_history() and self.config.get('history_rates', False)
def get_currency(self) -> str:
'''Use when dynamic fetching is needed'''
return self.config.get("currency", DEFAULT_CURRENCY)