Fix and improve room members event texts

This commit is contained in:
miruka
2019-04-21 12:25:55 -04:00
parent 94d6bc0e52
commit 909e1c3363
3 changed files with 42 additions and 11 deletions

View File

@@ -93,7 +93,12 @@ class SignalManager(QObject):
def onRoomLeft(self, client: Client, room_id: str) -> None:
rooms = self.backend.models.rooms[client.userId]
del rooms[rooms.indexWhere("roomId", room_id)]
try:
index = rooms.indexWhere("roomId", room_id)
except ValueError:
pass
else:
del rooms[index]
def onRoomSyncPrevBatchTokenReceived(