Show joined rooms, delete left rooms

To make the models update correctly in QML:
- ListModel and _QtModel merged
- Return a ListModelMap QObject from properties instead of
  a DefaultDict → QVariantMap
This commit is contained in:
miruka
2019-04-12 13:18:46 -04:00
parent 381c6b5b1c
commit 30514fb7db
12 changed files with 177 additions and 101 deletions

View File

@@ -61,7 +61,7 @@ class ClientManager(QObject):
def _on_connected(self, client: Client) -> None:
self.clients[client.nio.user_id] = client
self.clients[client.userID] = client
self.clientAdded.emit(client)
@@ -127,7 +127,7 @@ class ClientManager(QObject):
def configAdd(self, client: Client) -> None:
self._write_config({
**self.configAccounts(),
**{client.nio.user_id: {
**{client.userID: {
"hostname": client.nio.host,
"token": client.nio.access_token,
"device_id": client.nio.device_id,