- New ListItem implemented using a metaclass, which makes defining new
ListItem subclasses much cleaner and shorter
- ListModel functions taking an index now accept either an int
(list index) or str (value of a main key)
- getWhere() gone, simply use get(a_main_key_value) now
- updateOrAppendWhere replaced by update()/upsert()
- Standardized capitalization for variables and file names everywhere in
QML and JS, get rid of mixed camelCase/snakeCase,
use camelCase like everywhere in Qt
- ListModel items are now stored and returned as real QObjects with
PyQt properties and signals.
This makes dynamic property binding a lot easier and eliminates the need
for many hacks.
- New update(), updateOrAppendWhere() methods and roles property
for ListModel
- RoomHeader now properly updates when the room title or topic changes
- Add Backend.pdb(), to make it easier to start the debugger from QML
For any name not found in rooms data, rely on new
nio.HttpClient.get_displayname() function to get and cache it,
e.g. for our own name if no room is joined and past events from users
who left the room.
@futurize now returns PyQtFuture objects, wrapper for the
concurrent.futures.Future objects that can be used from QML,
to ensure name retrieval does not block the GUI.
- 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
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.
- Fix roomList height again, now based on model.count().
All delegates are assumed to be the same height
- Properly update room list when a room is joined or left
- Catch exceptions happening in threads (futures), which previously
passed silently
- Show "Empty room?" as "<i>Empty Room</i>" + gray [?] avatar
To make the models update correctly in QML:
- ListModel and _QtModel merged
- Return a ListModelMap QObject from properties instead of
a DefaultDict → QVariantMap