diff --git a/src/HistoryWidget.cpp b/src/HistoryWidget.cpp index 503f0ce..91677c7 100644 --- a/src/HistoryWidget.cpp +++ b/src/HistoryWidget.cpp @@ -70,6 +70,10 @@ void HistoryWidget::focusSearchbar() { ui->search->setFocus(); } +void HistoryWidget::setWebsocketEnabled(bool enabled) { + ui->history->setColumnHidden(TransactionHistoryModel::FiatAmount, !enabled); +} + void HistoryWidget::showContextMenu(const QPoint &point) { QModelIndex index = ui->history->indexAt(point); if (!index.isValid()) { diff --git a/src/HistoryWidget.h b/src/HistoryWidget.h index bee5a96..ae3c964 100644 --- a/src/HistoryWidget.h +++ b/src/HistoryWidget.h @@ -27,6 +27,7 @@ public: void setSearchbarVisible(bool visible); void focusSearchbar(); + void setWebsocketEnabled(bool enabled); public slots: void setSearchText(const QString &text); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index a421607..7de899a 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -564,6 +564,8 @@ void MainWindow::onWebsocketStatusChanged(bool enabled) { ui->tabWidget->setTabVisible(Tabs::CALC, enabled && config()->get(Config::showTabCalc).toBool()); ui->tabWidget->setTabVisible(Tabs::EXCHANGES, enabled && config()->get(Config::showTabExchange).toBool()); + m_historyWidget->setWebsocketEnabled(enabled); + #ifdef HAS_XMRIG m_xmrig->setDownloadsTabEnabled(enabled); #endif