Add lastSeenIp/Date to Device ListItem

This commit is contained in:
miruka 2019-05-09 14:22:50 -04:00
parent 1a90bb4331
commit d1dfd2673f
2 changed files with 9 additions and 4 deletions

View File

@ -150,6 +150,9 @@ class Backend(QObject):
tcl = lambda user: cl[f"@test_{user}:matrix.org"] tcl = lambda user: cl[f"@test_{user}:matrix.org"]
import json
jd = lambda obj: print(json.dumps(obj, indent=4, ensure_ascii=False))
import pdb import pdb
from PyQt5.QtCore import pyqtRemoveInputHook from PyQt5.QtCore import pyqtRemoveInputHook
pyqtRemoveInputHook() pyqtRemoveInputHook()

View File

@ -53,10 +53,12 @@ class Device(ListItem):
_required_init_values = {"deviceId", "ed25519Key"} _required_init_values = {"deviceId", "ed25519Key"}
_constant = {"deviceId", "ed25519Key"} _constant = {"deviceId", "ed25519Key"}
deviceId: str = "" deviceId: str = ""
ed25519Key: str = "" ed25519Key: str = ""
displayName: Optional[str] = None displayName: Optional[str] = None
trust: Trust = Trust.undecided trust: Trust = Trust.undecided
lastSeenIp: Optional[str] = None
lastSeenDate: Optional[QDateTime] = None
class Account(ListItem): class Account(ListItem):