Browse Source

fix refresh speed for currency changes

pull/34/head
Denio 5 years ago
parent
commit
b43276831e
  1. 5
      src/mainwindow.cpp
  2. 3
      src/settings.h

5
src/mainwindow.cpp

@ -424,6 +424,8 @@ void MainWindow::setupSettingsModal() {
this->slot_change_currency(currency_name);
;
// Setup theme combo
int theme_index = settings.comboBoxTheme->findText(Settings::getInstance()->get_theme_name(), Qt::MatchExactly);
@ -442,9 +444,10 @@ void MainWindow::setupSettingsModal() {
QObject::connect(settings.comboBoxCurrency, &QComboBox::currentTextChanged, [=] (QString currency_name) {
this->slot_change_currency(currency_name);
rpc->refresh(true);
// Tell the user to restart
QMessageBox::information(this, tr("Currency Change"), tr("Please restart SilentDragonLite to have new currencies apply"), QMessageBox::Ok);
QMessageBox::information(this, tr("Currency Change"), tr("This change can take a few seconds."), QMessageBox::Ok);
});
// Check for updates

3
src/settings.h

@ -124,7 +124,8 @@ public:
static const QString labelRegExp;
static const int updateSpeed = 30 * 1000; // 30 sec
static const int priceRefreshSpeed = 5 * 60 * 1000; // 1 hr
static const int quickUpdateSpeed = 5 * 1000; // 3 sec
static const int priceRefreshSpeed = 5 * 60 * 1000; // 15 min
private:
// This class can only be accessed through Settings::getInstance()

Loading…
Cancel
Save