fix: tor transport buttons on service start
This commit is contained in:
parent
129579531a
commit
c0fd7cf0aa
1 changed files with 14 additions and 11 deletions
|
@ -190,17 +190,20 @@ impl WalletTransport {
|
||||||
|
|
||||||
// Draw button to enable/disable Tor listener for current wallet.
|
// Draw button to enable/disable Tor listener for current wallet.
|
||||||
let service_id = &wallet.identifier();
|
let service_id = &wallet.identifier();
|
||||||
if !Tor::is_service_running(service_id) &&
|
if !Tor::is_service_starting(service_id) {
|
||||||
wallet.foreign_api_port().is_some() {
|
if !Tor::is_service_running(service_id) &&
|
||||||
View::item_button(ui, Rounding::default(), POWER, Some(Colors::GREEN), || {
|
wallet.foreign_api_port().is_some() {
|
||||||
if let Ok(key) = wallet.secret_key() {
|
View::item_button(ui, Rounding::default(), POWER, Some(Colors::GREEN), || {
|
||||||
Tor::start_service(wallet.foreign_api_port().unwrap(), key, service_id);
|
if let Ok(key) = wallet.secret_key() {
|
||||||
}
|
let api_port = wallet.foreign_api_port().unwrap();
|
||||||
});
|
Tor::start_service(api_port, key, service_id);
|
||||||
} else if !Tor::is_service_starting(service_id) {
|
}
|
||||||
View::item_button(ui, Rounding::default(), POWER, Some(Colors::RED), || {
|
});
|
||||||
Tor::stop_service(service_id);
|
} else {
|
||||||
});
|
View::item_button(ui, Rounding::default(), POWER, Some(Colors::RED), || {
|
||||||
|
Tor::stop_service(service_id);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let layout_size = ui.available_size();
|
let layout_size = ui.available_size();
|
||||||
|
|
Loading…
Reference in a new issue