mirror of
https://github.com/feather-wallet/feather.git
synced 2025-03-12 09:37:47 +00:00
MainWindow: cleanup updateNetStats
This commit is contained in:
parent
b9ec26ccef
commit
91713efe23
1 changed files with 5 additions and 12 deletions
|
@ -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())));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue