QString tooltip;
QString status = Utils::getPausedSyncStatus(m_wallet, m_nodes, &tooltip);
- // Log variables for debugging 149 vs 814k discrepancy
if (m_wallet) {
qDebug() << "Paused Status Calc: WalletHeight:" << m_wallet->blockChainHeight()
<< "DaemonHeight:" << m_wallet->daemonBlockChainHeight()
}
void MainWindow::setStatusText(const QString &text, bool override, int timeout) {
- // Log to qWarning as requested for debugging
- if (text != m_statusText) {
- qTrace() << "Setting status text:" << text;
- }
if (override) {
m_statusOverrideActive = true;
if (event->type() == QEvent::WindowStateChange) {
qDebug() << "changeEvent: WindowStateChange. State:" << this->windowState() << " isMinimized:" << this->isMinimized();
if (this->isMinimized()) {
- // ... existing logic ...
if (conf()->get(Config::lockOnMinimize).toBool()) {
this->lockWallet();
}
bool minimizeToTray = conf()->get(Config::minimizeToTray).toBool();
if (showTray && minimizeToTray) {
// Hide all widgets and dialogs, not just MainWindow
+ // TODO: Implement better logic here
for (const auto &widget : QApplication::topLevelWidgets()) {
widget->hide();
}
// Don't call refresh function if we don't have the daemon and target height
// We do this to prevent to UI from getting confused about the amount of blocks that are still remaining
if (haveHeights) {
+ // Prevent background network usage when sync is paused
+ if (m_syncPaused) {
+ last = std::chrono::steady_clock::now();
+ continue;
+ }
+
QMutexLocker locker(&m_asyncMutex);
if (m_newWallet) {
if (m_connection.isOnion())
return;
- this->autoConnect(true);
+ // If want onion node but aren't connected to one, reconnect used to blindly fire.
+ // We should check if we actually intend to switch.
+ if (this->useOnionNodes()) {
+ this->autoConnect(true);
+ }
}
}