The chat page is complex and slow to create, which creates a visible lag
when user switches room.
Instead of throwing the pre-switch one away and
making a new one from scratch, keep the same page and update its user &
room ID for a big improvement in responsiveness. The rest is automatic
thanks to QML property bindings.
When using the focus(Previous/Next)Message keybinds, no message is
focused and the view has been scrolled up, focus the message in the
center of the view instead of returning to the list's bottom to focus
the most recent one.
In the composer, when the text cursor was inside a word starting
with a @ but not matching any username (thus the completion UI being
invisible), pressing up/down arrow would not do anything instead of
going to the prev/next line.
The zoom keybinds now modify this setting directly.
The `uiScale` property in themes now default to using this zoom setting,
since just removing it would need of annoying changes through theme
files and QML code, and is best left to until the future theming
overhaul update.
Make it possible to see the change without restarting Mirage if an
image used for the theme's background was edited, or if used did the
mistake of typing "/path/to/img" then corrects it to
"file:///path/to/img".
When there's a one line (emote or non-message) event with its avatar
shown and combinable events follow it, that first event delegate's height
is supposed to be one line with the avatar overflowing into
the following event's blank space.
This behavior hasn't been working for a long time. This commit restores
it, along with improving the related code's quality.
- Remove pointless confusing aliases for avatar properties
(smallAvatar, collapseAvatar, etc)
- Make some EventDelegate properties readonly as they should be
- Use Layout.preferredWidth/Height for avatarWrapper instead of both
minimum and maximum W/H
Missing `}` in `chat.message.styleSheet` caused some CSS properties to
not work (sender name bottom margin, quotes color, no underline for
mentions, etc).
- Make the code cleaner and more declarative
- Start loading past events when the join state of the room changes,
e.g. when accepting an invite, load history right then
- Properly cancel the loading task when leaving the room chat page
Send a pseudo-reply consisting of two messages: a `m.text` which is just
a reply with an empty body, then the file event itself.
This is a workaround to the restriction imposed by the Matrix API,
which prevents us from simply attaching a reply to a media event:
https://matrix.org/docs/spec/client_server/latest#rich-replies
These cause problems with the composer alias parsing code.
If an alias from the config file has whitespace, only the first word
will be taken into account (ignoring any leading or trailing whitespace).
Simplify the code, make it more declarative, and improve the reliability
of sending typing notifications (notably when changing the used alias in
the middle of a message).