mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-25 02:55:46 +03:00
i think this fixes the room pagination limit.
rather than aborting on the final partial pagination, it instead paginates the remainder, and then aborts if you try to go any further.
This commit is contained in:
parent
995f2f032f
commit
eecc2b6296
1 changed files with 5 additions and 2 deletions
|
@ -238,9 +238,12 @@ class RoomListHandler(BaseHandler):
|
||||||
addition *= -1
|
addition *= -1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if sorted_rooms.index(last_room_id) == len(sorted_rooms):
|
||||||
|
new_limit = None
|
||||||
|
else:
|
||||||
new_limit = sorted_rooms.index(last_room_id) + addition
|
new_limit = sorted_rooms.index(last_room_id) + addition
|
||||||
if new_limit >= len(sorted_rooms):
|
if new_limit >= len(sorted_rooms):
|
||||||
new_limit = None
|
new_limit = len(sorted_rooms)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue