- Trigger when room is shown if there's not enough messages to fill the
list height
- Trigger whenever user is scrolling before a certain point, instead of
when dragging is released/scrolling stopped and the top edge is hit
- Prevent multiple load requests at same time
- Keep a set of fully loaded rooms, don't request anymore history
if a room is fully loaded
- Take a custom container callable for ListModel __init__ (defaults to
list, must be a MutableSequence)
- Use a Deque for roomEvents, which is much faster for inserting
new items at the beginning.
Qt somehow handles scrolling on new messages on its own when the
ListView direction is bottom to top.
In normal top to bottom, manual scrolling is completly buggy.
To make the models update correctly in QML:
- ListModel and _QtModel merged
- Return a ListModelMap QObject from properties instead of
a DefaultDict → QVariantMap