mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-13 11:25:02 -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;
|
m_loaded = true;
|
||||||
|
DispatchNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update our model of the wallet incrementally, to synchronize our model of the wallet
|
/* 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),
|
fProcessingQueuedTransactions(false),
|
||||||
platformStyle(_platformStyle)
|
platformStyle(_platformStyle)
|
||||||
{
|
{
|
||||||
|
subscribeToCoreSignals();
|
||||||
|
|
||||||
columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
|
columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
|
||||||
priv->refreshWallet(walletModel->wallet());
|
priv->refreshWallet(walletModel->wallet());
|
||||||
|
|
||||||
connect(walletModel->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &TransactionTableModel::updateDisplayUnit);
|
connect(walletModel->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &TransactionTableModel::updateDisplayUnit);
|
||||||
|
|
||||||
subscribeToCoreSignals();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionTableModel::~TransactionTableModel()
|
TransactionTableModel::~TransactionTableModel()
|
||||||
|
@ -722,7 +723,7 @@ void TransactionTablePriv::NotifyTransactionChanged(const uint256 &hash, ChangeT
|
||||||
|
|
||||||
TransactionNotification notification(hash, status, showTransaction);
|
TransactionNotification notification(hash, status, showTransaction);
|
||||||
|
|
||||||
if (m_loading)
|
if (!m_loaded || m_loading)
|
||||||
{
|
{
|
||||||
vQueueNotifications.push_back(notification);
|
vQueueNotifications.push_back(notification);
|
||||||
return;
|
return;
|
||||||
|
@ -732,7 +733,7 @@ void TransactionTablePriv::NotifyTransactionChanged(const uint256 &hash, ChangeT
|
||||||
|
|
||||||
void TransactionTablePriv::DispatchNotifications()
|
void TransactionTablePriv::DispatchNotifications()
|
||||||
{
|
{
|
||||||
if (m_loading) return;
|
if (!m_loaded || m_loading) return;
|
||||||
|
|
||||||
{
|
{
|
||||||
if (vQueueNotifications.size() > 10) { // prevent balloon spam, show maximum 10 balloons
|
if (vQueueNotifications.size() > 10) { // prevent balloon spam, show maximum 10 balloons
|
||||||
|
|
Loading…
Add table
Reference in a new issue