Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Jul 11, 2019
1 parent 779d575 commit 38cd076
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,11 +958,15 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
{
#ifdef Q_OS_MAC
// Disabling macOS App Nap on initial sync, disk, reindex operations and mixing.
(!masternodeSync.IsSynced()
bool disableAppNap = !masternodeSync.IsSynced();
#ifdef ENABLE_WALLET
|| privateSendClient.fPrivateSendRunning
disableAppNap |= privateSendClient.fPrivateSendRunning;
#endif // ENABLE_WALLET
) ? m_app_nap_inhibitor->disableAppNap() : m_app_nap_inhibitor->enableAppNap();
if (disableAppNap) {
m_app_nap_inhibitor->disableAppNap();
} else {
m_app_nap_inhibitor->enableAppNap();
}
#endif // Q_OS_MAC

if (modalOverlay)
Expand Down

0 comments on commit 38cd076

Please sign in to comment.