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.
For rich text (rendered HTML) fields and areas, the selectedText
property for some reason contains "\u2028" or "\u2029"
characters that look like newlines in Qt programs but are just
invisible anywhere else. Translate them to normal "\n".
Since 87fcb0a773f4855cdae7212fa9448a05de57be56, it was possible to call
a Python coroutine, but cancel it (due to parent component destruction)
before Python even has time to start it.
The registred QML callbacks for this coro would then be called,
potentially causing a segfault if that callback tried to access the
parent component or its properties.
The goTo{Previous,Next}{Unread,Mentioned}Room keybinds only took into
accounts rooms that had a server-sent unread/highlight count, and not
those that only had a client-side unread "!" badge (e.g. for rooms that
get new messages but that have push rules disabling notifications).
When we received server errors with no matrix M_CODE, the MatrixError
class would fall back to its first subclass that had a matching HTTP
status code. This notably caused any 401 error to be interpreted as
MatrixInvalidAccessToken, and disconnect the user.
Introduce a bookmark system for rooms:
a room bookmarked will always appear on top of every other
(for a given account).
Bookmarking can be done through context menu on targeted room
(as well as un-bookmarking) or through settings.json
(key roomBookmarkIDs) for permanent bookmark.
roomBookmarkIds is a {account_user_id: [room_id]} dict.
Require double click to open homepage (#140)
* Update TopBar.qml
To raise Mirage's window in a stacking wm, clicking on an area
without text, especially in the topbar, is probably what most users do.
In the case of the 2nd button in the topbar this currently accidentally
opens a browser window and thus becomes a privacy issue.
So for now require a double click to open mirage's homepage.
Alternatively the size of this button should at least be closely
restricted to the text "Mirage ${version number}".
In the long term it might be preferable to put this link into
some kind of "about" section instead of the "title" section.
* Make tooltip indicate that double click is required
Co-authored-by: miruka <miruka@disroot.org>
menu.mediaType can be an enum value, which includes 0 to represent a
web page link, or null if no link was right clicked.
Check for null explicitely when evaluating whether the menu entry
should be displayed.
zoomOut/zoomIn, rotateRight/rotateLeft, previousSpeed/nextSpeed:
Make them shift+Z/Z, shift+R/R, shift+S/S by default
instead of Z/Shift+Z, R/shift+R, S/shift+S
Sometimes and randomly, a HListView/HGridView delegate's
add/populate transition will stop before completion.
This especially happens on startup when loading a large room list,
one room might get stuck and left tiny or invisible, despite its
normal space still being taken.
If a context menu is already opened for that HTile when right clicking
or using a keybind like Alt+P (openPresenceMenu), close it instead of
just creating a duplicate one.
Returning a Future doesn't work on Windows for some reason
(https://github.com/thp/pyotherside/issues/116).
Instead of using these objects from QML to cancel running coroutines,
call a Python QMLBridge function that takes a coroutine UUID and will
take care of the cancelling.
Set an explicit default left alignment for label components, to prevent
other people's right-to-left names or text from messing up the UI
in a left-to-right environment.
When user starts typing something in the console, then navigates the
history with up but comes back to normal input by pressing down, restore
the text that was initially typed before navigating.
If user right clicked on the most recent event in the timeline
(index 0), a new message was posted in the room (the new index 0),
and the user right clicked on it, the EventContextMenu's `event`
property relying on the index would not detect any change and
thus would still target the previous event.
This affected options depending on this property like "Reply".
The problem was reproducible with any same index repetition, not just 0.
The "Mentions & keywords only" option doesn't work yet in multi-account
cases: when notifications arrive for a room that multiple accounts are
part of, the first notification to arrive is let through, and the
duplicate later ones are ignored. The first notification to arrive may
not be from the account that gets highlighted, thus it is ignored under
the "Mentions & keywords" setting.
- Make the code cleaner and don't require bash
- Generate less uneeded intermediate files
- Add the flatpak-pip-generator script to make clean
- flatpak-pip-generator now requires requirements-parser from pip