mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
don't show daemon popup when connected
This commit is contained in:
parent
979acf774a
commit
8a0163f14a
2 changed files with 18 additions and 16 deletions
23
main.qml
23
main.qml
|
@ -265,10 +265,20 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
function onWalletConnectionStatusChanged(status){
|
||||
console.log("Wallet connection status changed")
|
||||
console.log("Wallet connection status changed " + status)
|
||||
middlePanel.updateStatus();
|
||||
leftPanel.networkStatus.connected = status
|
||||
leftPanel.progressBar.visible = (status === Wallet.ConnectionStatus_Connected) && !daemonSynced
|
||||
|
||||
// If wallet isnt connected and no daemon is running - Ask
|
||||
if(!walletInitialized && status === Wallet.ConnectionStatus_Disconnected && !daemonManager.running()){
|
||||
daemonManagerDialog.open();
|
||||
}
|
||||
// initialize transaction history once wallet is initialized first time;
|
||||
if (!walletInitialized) {
|
||||
currentWallet.history.refresh()
|
||||
walletInitialized = true
|
||||
}
|
||||
}
|
||||
|
||||
function onWalletOpened(wallet) {
|
||||
|
@ -345,12 +355,6 @@ ApplicationWindow {
|
|||
// Update transfer page status
|
||||
middlePanel.updateStatus();
|
||||
|
||||
|
||||
// If wallet isnt connected and no daemon is running - Ask
|
||||
if(currentWallet.connected === Wallet.ConnectionStatus_Disconnected && !daemonManager.running() && !walletInitialized){
|
||||
daemonManagerDialog.open();
|
||||
}
|
||||
|
||||
// Refresh is succesfull if blockchain height > 1
|
||||
if (currentWallet.blockChainHeight() > 1){
|
||||
|
||||
|
@ -368,11 +372,6 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
// initialize transaction history once wallet is initializef first time;
|
||||
if (!walletInitialized) {
|
||||
currentWallet.history.refresh()
|
||||
walletInitialized = true
|
||||
}
|
||||
onWalletUpdate();
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,8 @@ void Wallet::updateConnectionStatusAsync()
|
|||
QFuture<Monero::Wallet::ConnectionStatus> future = connectionWatcher->future();
|
||||
connectionWatcher->deleteLater();
|
||||
ConnectionStatus newStatus = static_cast<ConnectionStatus>(future.result());
|
||||
if (newStatus != m_connectionStatus) {
|
||||
if (newStatus != m_connectionStatus || !m_initialized) {
|
||||
m_initialized = true;
|
||||
m_connectionStatus = newStatus;
|
||||
emit connectionStatusChanged(newStatus);
|
||||
}
|
||||
|
@ -131,7 +132,6 @@ Wallet::ConnectionStatus Wallet::connected(bool forceCheck)
|
|||
if (forceCheck || !m_initialized || (m_connectionStatusTime.elapsed() / 1000 > m_connectionStatusTtl && !m_connectionStatusRunning) || m_connectionStatusTime.elapsed() > 30000) {
|
||||
qDebug() << "Checking connection status";
|
||||
m_connectionStatusRunning = true;
|
||||
m_initialized = true;
|
||||
m_connectionStatusTime.restart();
|
||||
updateConnectionStatusAsync();
|
||||
}
|
||||
|
@ -184,8 +184,11 @@ bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit, b
|
|||
void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering, quint64 restoreHeight)
|
||||
{
|
||||
qDebug() << "initAsync: " + daemonAddress;
|
||||
m_connectionStatus = Wallet::ConnectionStatus_Disconnected;
|
||||
emit connectionStatusChanged(m_connectionStatus);
|
||||
// Change status to disconnected if connected
|
||||
if(m_connectionStatus != Wallet::ConnectionStatus_Disconnected) {
|
||||
m_connectionStatus = Wallet::ConnectionStatus_Disconnected;
|
||||
emit connectionStatusChanged(m_connectionStatus);
|
||||
}
|
||||
|
||||
QFuture<bool> future = QtConcurrent::run(this, &Wallet::init,
|
||||
daemonAddress, upperTransactionLimit, isRecovering, restoreHeight);
|
||||
|
|
Loading…
Reference in a new issue