From b43276831e905d7628f8ec2434ad6224b0bd01da Mon Sep 17 00:00:00 2001 From: Denio Date: Thu, 21 Nov 2019 21:51:27 +0100 Subject: [PATCH] fix refresh speed for currency changes --- src/mainwindow.cpp | 5 ++++- src/settings.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c547f95..6353bf0 100644 --- a/src/mainwindow.cpp +++ b/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 diff --git a/src/settings.h b/src/settings.h index 25ef294..af16f90 100644 --- a/src/settings.h +++ b/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()