mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
qt: Early subscribe core signals in transaction table model
This commit is contained in:
parent
c6cbdf1a90
commit
57785fb7f6
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue