electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 53a5a21ee89b791c351ad39a47e69837ed347af8
parent 9bba65199e80556de0c6efd28258344777ac5a6d
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon,  7 Sep 2020 17:16:06 +0200

hardware: update device conn. status faster (through GUI indicator)

Qt status bar icon will now refresh to reflect disconnected device
during next scan

Diffstat:
Melectrum/plugin.py | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/electrum/plugin.py b/electrum/plugin.py @@ -705,18 +705,20 @@ class DeviceMgr(ThreadJob): # find out what was disconnected pairs = [(dev.path, dev.id_) for dev in devices] - disconnected_ids = [] + disconnected_clients = [] with self.lock: connected = {} for client, pair in self.clients.items(): if pair in pairs and client.has_usable_connection_with_device(): connected[client] = pair else: - disconnected_ids.append(pair[1]) + disconnected_clients.append((client, pair[1])) self.clients = connected # Unpair disconnected devices - for id_ in disconnected_ids: + for client, id_ in disconnected_clients: self.unpair_id(id_) + if client.handler: + client.handler.update_status(False) return devices