Commit 34a6ef00 authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed loading last 100 messages from storage

parent a2a082e9
......@@ -363,7 +363,7 @@ class MessageHistory(object, metaclass=Singleton):
# print('-- Loading messages')
notification_center = NotificationCenter()
try:
result = Message.selectBy(remote_uri=uri)[:100]
result = Message.selectBy(remote_uri=uri)[-100:]
except Exception as e:
notification_center.post_notification('BlinkMessageHistoryLoadDidFail', sender=session, data=NotificationData(uri=uri))
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment