Fix these issues:
- When the cursor was on the last soft-line of a word-wrapped line,
pressing down wouldn't go to the next history entry
- When the cursor was after the first soft-line of a word-wrapped line
and that line was the first of the text area, pressing up would
go to the previous history entry instead of moving the cursor to the
first soft-line
Add visibleStart/End properties to HListView that take into account the
ListView's originX/Y, and not just contentX/Y which can be largely
offset.
Use those new properties in EventList for message focusing (fix
ctrl+up/down sometimes incorrectly focusing the message at the middle of
the screen even when we're scrolled at the bottom), and detection of
when we can update the read marker (fix cases when we're scrolled at the
bottom but the read marker never updates).
The SVG colors are now an enum of Color objects, instead of hex strings.
The "transparent" color was also added, which isn't in the standards but
works in QML.
Don't use the default config if there's an error in a JSON config file,
a single typo could lead to an entire user settings file getting
overwritten by default data.
- Cleaner design for the backend user_files classes and simplified
interaction with QML
- Config and theme files will now automatically reload when changed on
disk
- Removed manual reload keybind and button
When switching rooms, first load only the delegates in the user's view
and wait a second before expanding the cacheBuffer and loading more
delegates outside the view. This reduces the amount of delegates to load
all at once by 3x.
When a chat page is recycled, set the eventList model to
null, wait for any animations to finish, then explicitely reassign it.
This prevents from model from randomly mixing up old and news delegates.
CppUtils.idleMilliseconds(): If the WAYLAND_DISPLAY environment
variable is set, assume we're running under a Wayland environment
and return early before trying to connect to an X11 display.
If XScreenSaver is available but not supported
(e.g. when running in XWayland), return -1 for
Utils.idleMilliseconds(), instead of letting the code fail and print an
error every time this function gets called to check for the machine's
idle time.
Make sure to not load tooltip images unless the user is
currently trying to see one by hovering on an avatar.
This also seems to reduce idle CPU usage.
If a model has tuple keys, these already get turned into JSON strings
for the ModelItemSet pyotherside event (for QML and JS reasons).
Do the same for ModelItemDeleted's ids field, else the QML event handler
will be unable to find the items by IDs.