ui: Disable device updates for now.

This commit is contained in:
Damir Jelić 2019-04-30 13:08:22 +02:00
parent da552973ff
commit 7bb47092ff
2 changed files with 15 additions and 13 deletions

View File

@ -119,7 +119,6 @@ class PanCtl:
dbus_interface="org.pantalaimon.control.import_keys" dbus_interface="org.pantalaimon.control.import_keys"
) )
def export_keys(self, args): def export_keys(self, args):
try: try:
user, filepath, passphrase = args user, filepath, passphrase = args

View File

@ -113,18 +113,21 @@ class Devices(dbus.service.Object):
def update_devices(self, message): def update_devices(self, message):
device_store = self.device_list[message.user_id] device_store = self.device_list[message.user_id]
for user_id, device_dict in message.devices.items(): # TODO the store type got changed to a list, fix adding/removing of
for device in device_dict.values(): # devices.
if device.deleted:
device_store[user_id].pop(device.id, None) # for user_id, device_dict in message.devices.items():
else: # for device in device_dict.values():
device_store[user_id][device.id] = { # if device.deleted:
"user_id": device.user_id, # device_store[user_id].remove(device.id, None)
"device_id": device.id, # else:
"fingerprint_key": device.ed25519, # device_store[user_id][device.id] = {
"sender_key": device.curve25519, # "user_id": device.user_id,
"trust_state": TrustState.unset.name, # "device_id": device.id,
} # "fingerprint_key": device.ed25519,
# "sender_key": device.curve25519,
# "trust_state": TrustState.unset.name,
# }
class Control(dbus.service.Object): class Control(dbus.service.Object):