Load past events when scrolling up
Also keep two nio clients internally: one for loop-syncing, one for the rest; since they can't handle more than one talk at a time.
This commit is contained in:
@@ -81,6 +81,21 @@ class SignalManager(QObject):
|
||||
del rooms[rooms.indexWhere("room_id", room_id)]
|
||||
|
||||
|
||||
def onRoomSyncPrevBatchTokenReceived(
|
||||
self, _: Client, room_id: str, token: str
|
||||
) -> None:
|
||||
|
||||
if room_id not in self.backend.past_tokens:
|
||||
self.backend.past_tokens[room_id] = token
|
||||
|
||||
|
||||
def onRoomPastPrevBatchTokenReceived(
|
||||
self, _: Client, room_id: str, token: str
|
||||
) -> None:
|
||||
|
||||
self.backend.past_tokens[room_id] = token
|
||||
|
||||
|
||||
def onRoomEventReceived(
|
||||
self, _: Client, room_id: str, etype: str, edict: Dict[str, Any]
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user