mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 15:21:30 +02:00
MainWindow: cleanup updateNetStats
This commit is contained in:
+5
-12
@@ -1187,21 +1187,14 @@ void MainWindow::onDeviceButtonPressed() {
|
||||
}
|
||||
|
||||
void MainWindow::updateNetStats() {
|
||||
if (m_ctx->wallet == nullptr) {
|
||||
m_statusLabelNetStats->setText("");
|
||||
return;
|
||||
}
|
||||
if (m_ctx->wallet->connectionStatus() == Wallet::ConnectionStatus_Disconnected) {
|
||||
m_statusLabelNetStats->setText("");
|
||||
if (!m_ctx->wallet || m_ctx->wallet->connectionStatus() == Wallet::ConnectionStatus_Disconnected
|
||||
|| m_ctx->wallet->connectionStatus() == Wallet::ConnectionStatus_Synchronized)
|
||||
{
|
||||
m_statusLabelNetStats->hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_ctx->wallet->connectionStatus() == Wallet::ConnectionStatus_Synchronized) {
|
||||
m_statusLabelNetStats->setText("");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
m_statusLabelNetStats->show();
|
||||
m_statusLabelNetStats->setText(QString("(D: %1)").arg(Utils::formatBytes(m_ctx->wallet->getBytesReceived())));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user