History: update on websocket fiat rates received

This commit is contained in:
tobtoht 2021-10-22 23:26:28 +02:00
parent 6ccc988420
commit 2e7b23898c
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View 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()) {