aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiontablemodel.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2021-04-29 00:11:10 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2021-04-29 00:18:55 +0100
commit57785fb7f61e51e8a8a459486a594443665ea8c9 (patch)
treea63e0ec8ed03a2f79582fac078073ffcdc45f3a1 /src/qt/transactiontablemodel.cpp
parentc6cbdf1a90a253fef0259b365a782bf88cd437f2 (diff)
qt: Early subscribe core signals in transaction table model
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r--src/qt/transactiontablemodel.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 903a97a59d..c0bdb36e3a 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -118,6 +118,7 @@ public:
}
}
m_loaded = true;
+ DispatchNotifications();
}
/* Update our model of the wallet incrementally, to synchronize our model of the wallet
@@ -252,12 +253,12 @@ TransactionTableModel::TransactionTableModel(const PlatformStyle *_platformStyle
fProcessingQueuedTransactions(false),
platformStyle(_platformStyle)
{
+ subscribeToCoreSignals();
+
columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
priv->refreshWallet(walletModel->wallet());
connect(walletModel->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &TransactionTableModel::updateDisplayUnit);
-
- subscribeToCoreSignals();
}
TransactionTableModel::~TransactionTableModel()
@@ -722,7 +723,7 @@ void TransactionTablePriv::NotifyTransactionChanged(const uint256 &hash, ChangeT
TransactionNotification notification(hash, status, showTransaction);
- if (m_loading)
+ if (!m_loaded || m_loading)
{
vQueueNotifications.push_back(notification);
return;
@@ -732,7 +733,7 @@ void TransactionTablePriv::NotifyTransactionChanged(const uint256 &hash, ChangeT
void TransactionTablePriv::DispatchNotifications()
{
- if (m_loading) return;
+ if (!m_loaded || m_loading) return;
{
if (vQueueNotifications.size() > 10) { // prevent balloon spam, show maximum 10 balloons