Qt: update header count regardless of update delay

This commit is contained in:
Jonas Schnelli 2019-01-03 11:34:38 -10:00
parent 1d73636fdf
commit 7bb45e4b7a
No known key found for this signature in database
GPG key ID: 1EB776BB03C7922D

View file

@ -237,8 +237,8 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, int heig
clientmodel->cachedBestHeaderHeight = height; clientmodel->cachedBestHeaderHeight = height;
clientmodel->cachedBestHeaderTime = blockTime; clientmodel->cachedBestHeaderTime = blockTime;
} }
// if we are in-sync, update the UI regardless of last update time // if we are in-sync or if we notify a header update, update the UI regardless of last update time
if (!initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) { if (fHeader || !initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) {
//pass an async signal to the UI thread //pass an async signal to the UI thread
QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection, QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection,
Q_ARG(int, height), Q_ARG(int, height),