This popup the virtual keyboard and is quite distrubing on mobile.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit bc84ad8d56)
Make return/enter create a newline on mobile. This is the traditional behaviour in other messengers as the send icon and return have are the same time to access and solves the linked issue.
Closesnetwork/neochat#466
(cherry picked from commit afe8a2a5e4)
Rework the filtering of state events in the timeline and for lastevent. This is now consistent everywhere and includes the following:
- The timeline settings are obeyed everywhere
- A new setting is added to filter all state events
- Last event obeys the timeline setting in all cases
- The roomlist will show a state event as the latest event if it's visible in the timeline
- Names are no longer hyperlinked in eventToString if plaintext is selected.
BUG: 455048\
Closesnetwork/neochat#148
(cherry picked from commit 741cb57105)
- Add the ability to set the deafult url preview setting for the room if you have sufficient power level.
- Add the ability for the user to set the desired url preview setting.
network/neochat#560
(cherry picked from commit 81c73037ca)
Improve the handling of text both when sending and receiving.
The main feature is to fix the linked bug (and a host of others that are unreported but similar) which is caused by the fact that we don't properly clean html. This mr does that as per the matrix spec https://spec.matrix.org/v1.5/client-server-api/#mroommessage-msgtypes. So any disallowed tags or attributes are removed and it does the special handling for certain attributes.
Additionally the functions are also designed to cover any other text formatting required, particularly fro received strings.
The receive side is covered by 2 functions `handleRecieveRichText` and `handleRecievePlainText`. The rich/plain in the function name refers to the output type not the input type (both can take plain and rich input), so `handleRecieveRichText` is called to get a string suitable to go in a rich text control and `handleRecievePlainText` for a plain control.
The functions also handle the following some of which was previously handled by `eventToString` in `NeoChatRoom`:
- Strip and reply from the string
- Format any user mentions
- Linkify links in plain strings
- Handle mxc urls in rich text (uses the new `room->makeMediaUrl` functionality from libQuotient)
- `handleRecievePlainText` also deals with markup making `NeoChatRoom->subtitle` redundant
There is also an extensive test suite which defines the behaviour and the best way to review this is probably to look at the tests and decide whether you agree with the expected output given the inputs and/or if there is any missing behaviour.
The final aim especially with the test suite is to give us a framework to make further updates in the future easier and hopefully prevent a new feature breaking old behaviour with the tests.
BUG: 463932 \
BUG: 466330 \
BUG: 466930
(cherry picked from commit f6ba4f2ecd)
Add the ability to see other user's read markers.

Implements network/neochat#133
(cherry picked from commit 23303c0483)
Add the option to set powerlevel to userdetaildialog.
This is done by making the powerleveldialog into it's own file and using that.
implements network/neochat#570
- Move the room list drag handler and logic to RoomList.qml.
- Make the compact mode logic not rely on a saved width value from Config as this was causing the room list to have large icons the first launch after a recent update.
- Instead save the compact mode state and initialise the width based upon that.
Remove the global menu and move explore and new chat/room buttons to new `ExploreComponent.qml`.
This is designed to sit in the header of the `RoomListPage` and will only be visible when the room list is. The other settings have just been removed as they are covered by the `UserInfo` component and quick can be done form the decoration or system tray.
When wide\

Collapsed mode\

This feature doesn't work very well at the moment, but that's not an
excuse not to have a keyboard shortcut for it. As usual, it's the same
shortcut as many other chat clients use.
Since commit eee93e0f1, the ChatBar has a conflicting shortcut that
takes precedence even when it doesn't do anything, so that the Escape
shortcut of RoomPage is never actually invoked any more.
Fix this by using Keys.onShortcutOverride() instead in ChatBar and
accepting the event only when it actually cancelled something. So if
you're writing a reply, the first time pressing Escape cancels the reply
and the second one calls the RoomPage shortcut that goes to the
RoomListPage.
This is the same key combination as commonly used by other chat clients
such as Element, Slack and Discord. For consistency, also add the same
Alt+Up/Down shortcut as used in thes other clients as aliases for
switching rooms without considering the unread status.
This is a key combination that doesn't seem to be used either in NeoChat
nor with a common meaning in other chat clients, so let's use it for
switching the user.
This allows to use the room switching shortcuts like Ctrl+PgUp/PgDn even
when the RoomPage doesn't currently have the focus. It's also a nice
code simplification.
If you're on the first visible room and try to switch to the previous
one (or on the last visible room switching to the next one), the first
(or last) room in the list is incorrectly selected even if it's not
currently visible.
Fix this by not first entering each room and then checking whether it is
the one we really wanted, but iterating until we find a room that we
want and only entering it then.