Skip to content

Commit b96ddbd

Browse files
committed
Fix bug in recent transaction list
This commit fixes a small bug in the recent transaction list on the overview screen introduced by PR 2399.
1 parent db4fe22 commit b96ddbd

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/qt/overviewpage.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,6 @@ void OverviewPage::updateTransactions()
217217
{
218218
int numItems = getNumTransactionsForView();
219219

220-
// When we receive our first transaction, we can free the memory used
221-
// for the "nothing here yet" placeholder in the transaction list. It
222-
// will never appear again:
223-
//
224-
if (!filter->rowCount())
225-
{
226-
ui->recentTransactionsNoResult->setVisible(true);
227-
}
228-
229220
LogPrint(BCLog::LogFlags::QT, "OverviewPage::updateTransactions(): numItems = %d, getLimit() = %d",
230221
numItems, filter->getLimit());
231222

@@ -254,6 +245,13 @@ void OverviewPage::updateTransactions()
254245
}
255246

256247
ui->listTransactions->update();
248+
249+
int transaction_count = filter->rowCount();
250+
251+
// This needs to be both here and in SetPrivacy because the trigger could come from either.
252+
ui->recentTransactionsNoResult->setVisible(m_privacy || !transaction_count);
253+
ui->listTransactions->setVisible(!m_privacy && transaction_count);
254+
257255
LogPrint(BCLog::LogFlags::QT, "OverviewPage::updateTransactions(), end update");
258256
}
259257
}
@@ -328,6 +326,7 @@ void OverviewPage::setPrivacy(bool privacy)
328326
} else {
329327
ui->recentTransactionsNoResult->showDefaultNothingHereTitle();
330328
}
329+
331330
ui->recentTransactionsNoResult->setVisible(m_privacy || !transaction_count);
332331
ui->listTransactions->setVisible(!m_privacy && transaction_count);
333332
if (researcherModel) researcherModel->setMaskAccrualAndMagnitude(m_privacy);

0 commit comments

Comments
 (0)