mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-17 01:37:53 +00:00
lock: fix connection status
This commit is contained in:
parent
96bbdd126a
commit
6a3b3fc830
3 changed files with 8 additions and 3 deletions
|
@ -667,7 +667,6 @@ void MainWindow::onProxySettingsChanged() {
|
|||
}
|
||||
|
||||
void MainWindow::onOfflineMode(bool offline) {
|
||||
this->onConnectionStatusChanged(Wallet::ConnectionStatus_Disconnected);
|
||||
m_wallet->setOffline(offline);
|
||||
|
||||
if (m_wallet->viewOnly()) {
|
||||
|
@ -717,6 +716,9 @@ void MainWindow::onRefreshSync(int height, int target) {
|
|||
|
||||
void MainWindow::onConnectionStatusChanged(int status)
|
||||
{
|
||||
// Note: Wallet does not emit this signal unless status is changed, so calling this function from MainWindow may
|
||||
// result in the wrong connection status being displayed.
|
||||
|
||||
qDebug() << "Wallet connection status changed " << Utils::QtEnumToString(static_cast<Wallet::ConnectionStatus>(status));
|
||||
|
||||
// Update connection info in status bar.
|
||||
|
|
|
@ -274,8 +274,11 @@ void Wallet::setSeedLanguage(const QString &lang)
|
|||
|
||||
// #################### Node connection ####################
|
||||
|
||||
void Wallet::setOffline(bool offline) const {
|
||||
void Wallet::setOffline(bool offline) {
|
||||
m_wallet2->set_offline(offline);
|
||||
if (offline) {
|
||||
setConnectionStatus(Wallet::ConnectionStatus_Disconnected);
|
||||
}
|
||||
}
|
||||
|
||||
void Wallet::setTrustedDaemon(bool arg) {
|
||||
|
|
|
@ -193,7 +193,7 @@ public:
|
|||
|
||||
// ##### Node connection #####
|
||||
|
||||
void setOffline(bool offline) const;
|
||||
void setOffline(bool offline);
|
||||
|
||||
//! indicates if daemon is trusted
|
||||
void setTrustedDaemon(bool arg);
|
||||
|
|
Loading…
Reference in a new issue