1
0

Compare commits

...

1 Commits

Author SHA1 Message Date
Matthew Hodgson
eecc2b6296 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.
2016-09-17 01:40:31 +01:00

View File

@@ -238,9 +238,12 @@ class RoomListHandler(BaseHandler):
addition *= -1
try:
new_limit = sorted_rooms.index(last_room_id) + addition
if new_limit >= len(sorted_rooms):
if sorted_rooms.index(last_room_id) == len(sorted_rooms):
new_limit = None
else:
new_limit = sorted_rooms.index(last_room_id) + addition
if new_limit >= len(sorted_rooms):
new_limit = len(sorted_rooms)
except ValueError:
pass