Skip to content

Commit

Permalink
Merge pull request #2403 from jamescowens/implement_privacy_mode
Browse files Browse the repository at this point in the history
gui: Fix bug in recent transaction list
  • Loading branch information
jamescowens authored Dec 3, 2021
2 parents 8e6fa53 + b96ddbd commit 472b7a2
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,6 @@ void OverviewPage::updateTransactions()
{
int numItems = getNumTransactionsForView();

// When we receive our first transaction, we can free the memory used
// for the "nothing here yet" placeholder in the transaction list. It
// will never appear again:
//
if (!filter->rowCount())
{
ui->recentTransactionsNoResult->setVisible(true);
}

LogPrint(BCLog::LogFlags::QT, "OverviewPage::updateTransactions(): numItems = %d, getLimit() = %d",
numItems, filter->getLimit());

Expand Down Expand Up @@ -254,6 +245,13 @@ void OverviewPage::updateTransactions()
}

ui->listTransactions->update();

int transaction_count = filter->rowCount();

// This needs to be both here and in SetPrivacy because the trigger could come from either.
ui->recentTransactionsNoResult->setVisible(m_privacy || !transaction_count);
ui->listTransactions->setVisible(!m_privacy && transaction_count);

LogPrint(BCLog::LogFlags::QT, "OverviewPage::updateTransactions(), end update");
}
}
Expand Down Expand Up @@ -328,6 +326,7 @@ void OverviewPage::setPrivacy(bool privacy)
} else {
ui->recentTransactionsNoResult->showDefaultNothingHereTitle();
}

ui->recentTransactionsNoResult->setVisible(m_privacy || !transaction_count);
ui->listTransactions->setVisible(!m_privacy && transaction_count);
if (researcherModel) researcherModel->setMaskAccrualAndMagnitude(m_privacy);
Expand Down

0 comments on commit 472b7a2

Please sign in to comment.