Hide History -> Fiat when websocket is disabled

This commit is contained in:
tobtoht 2022-07-03 18:24:33 +02:00
parent 678e011642
commit f04019580e
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
3 changed files with 7 additions and 0 deletions

View file

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

View file

@ -27,6 +27,7 @@ public:
void setSearchbarVisible(bool visible);
void focusSearchbar();
void setWebsocketEnabled(bool enabled);
public slots:
void setSearchText(const QString &text);

View file

@ -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