From 7bb47092ff0f8ebcf44e1e1c087c3381b0453d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 30 Apr 2019 13:08:22 +0200 Subject: [PATCH] ui: Disable device updates for now. --- pantalaimon/panctl.py | 1 - pantalaimon/ui.py | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pantalaimon/panctl.py b/pantalaimon/panctl.py index 9a075f7..0cd54c5 100644 --- a/pantalaimon/panctl.py +++ b/pantalaimon/panctl.py @@ -119,7 +119,6 @@ class PanCtl: dbus_interface="org.pantalaimon.control.import_keys" ) - def export_keys(self, args): try: user, filepath, passphrase = args diff --git a/pantalaimon/ui.py b/pantalaimon/ui.py index a309708..f9b0752 100644 --- a/pantalaimon/ui.py +++ b/pantalaimon/ui.py @@ -113,18 +113,21 @@ class Devices(dbus.service.Object): def update_devices(self, message): device_store = self.device_list[message.user_id] - for user_id, device_dict in message.devices.items(): - for device in device_dict.values(): - if device.deleted: - device_store[user_id].pop(device.id, None) - else: - device_store[user_id][device.id] = { - "user_id": device.user_id, - "device_id": device.id, - "fingerprint_key": device.ed25519, - "sender_key": device.curve25519, - "trust_state": TrustState.unset.name, - } + # TODO the store type got changed to a list, fix adding/removing of + # devices. + + # for user_id, device_dict in message.devices.items(): + # for device in device_dict.values(): + # if device.deleted: + # device_store[user_id].remove(device.id, None) + # else: + # device_store[user_id][device.id] = { + # "user_id": device.user_id, + # "device_id": device.id, + # "fingerprint_key": device.ed25519, + # "sender_key": device.curve25519, + # "trust_state": TrustState.unset.name, + # } class Control(dbus.service.Object):