mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
Change scan_devices logic
Fixes title bar updates about watching only
This commit is contained in:
parent
e4269f2684
commit
4fe01cb8d3
1 changed files with 3 additions and 3 deletions
|
@ -166,6 +166,8 @@ class TrezorCompatiblePlugin(BasePlugin):
|
||||||
connected = set([c for c in self.clients if c.path in paths])
|
connected = set([c for c in self.clients if c.path in paths])
|
||||||
disconnected = self.clients - connected
|
disconnected = self.clients - connected
|
||||||
|
|
||||||
|
self.clients = connected
|
||||||
|
|
||||||
# Inform clients and wallets they were disconnected
|
# Inform clients and wallets they were disconnected
|
||||||
for client in disconnected:
|
for client in disconnected:
|
||||||
self.print_error("device disconnected:", client)
|
self.print_error("device disconnected:", client)
|
||||||
|
@ -191,7 +193,7 @@ class TrezorCompatiblePlugin(BasePlugin):
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
self.print_error("cannot create client for", path, str(e))
|
self.print_error("cannot create client for", path, str(e))
|
||||||
else:
|
else:
|
||||||
connected.add(client)
|
self.clients.add(client)
|
||||||
self.print_error("new device:", client)
|
self.print_error("new device:", client)
|
||||||
|
|
||||||
# Inform reconnected wallets
|
# Inform reconnected wallets
|
||||||
|
@ -200,8 +202,6 @@ class TrezorCompatiblePlugin(BasePlugin):
|
||||||
client.wallet = wallet
|
client.wallet = wallet
|
||||||
wallet.connected()
|
wallet.connected()
|
||||||
|
|
||||||
self.clients = connected
|
|
||||||
|
|
||||||
def clear_session(self, client):
|
def clear_session(self, client):
|
||||||
# Clearing the session forces pin re-entry
|
# Clearing the session forces pin re-entry
|
||||||
self.print_error("clear session:", client)
|
self.print_error("clear session:", client)
|
||||||
|
|
Loading…
Add table
Reference in a new issue