]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
History: update on websocket fiat rates received
authortobtoht <thotbot@protonmail.com>
Fri, 22 Oct 2021 21:26:28 +0000 (23:26 +0200)
committertobtoht <thotbot@protonmail.com>
Fri, 22 Oct 2021 21:26:28 +0000 (23:26 +0200)
src/HistoryWidget.cpp

index eef0c8676fdb613c732b8b5cc237e443a9381909..c44651720a7f8a6afb08084ccfadbc2497523848 100644 (file)
@@ -11,6 +11,7 @@
 #include "dialog/TxProofDialog.h"
 #include "utils/config.h"
 #include "utils/Icons.h"
+#include "WebsocketNotifier.h"
 
 HistoryWidget::HistoryWidget(QSharedPointer<AppContext> ctx, QWidget *parent)
         : QWidget(parent)
@@ -53,6 +54,10 @@ HistoryWidget::HistoryWidget(QSharedPointer<AppContext> ctx, QWidget *parent)
     ui->syncNotice->setVisible(config()->get(Config::showHistorySyncNotice).toBool());
     ui->history->setHistoryModel(m_model);
 
+    connect(websocketNotifier(), &WebsocketNotifier::FiatRatesReceived, [this]{
+        ui->history->update();
+    });
+
     // Load view state
     QByteArray historyViewState = QByteArray::fromBase64(config()->get(Config::GUI_HistoryViewState).toByteArray());
     if (!historyViewState.isEmpty()) {