Just loading that plugin already triggers an HTTP request, so lets only
do that when really needed and even more importantly, not for every single
location delegate again.
Create a cpp helper class to calculate the correct delegate width given it's parent width.
This is designed to be more robust and hopefully easier to understand than the current mass of javascript calcs.
BUG: 470167
Create a reaction model that provides all the required data for `ReactionDelegate` so that none need to be calculated in QML.
This also cleans up the API for `ReactionDelegate`
- Now has tabs setup as more features are added
- First extra tab has basic server info
- Use mobileform to make it look nicer
- For the room data tab allow the room to be changed from within devtools
- For the room data tab allow m.room.member events to be filtered out so other event types can be found easily
- For the room data tab allow viewing room account data
network/neochat#557
Document and cleanup userlist model.
- Remove unneeded enum UserTypes
- Cleanup includes and remove need to include QPointer
- make clear that it is a user or users that are being refreshed
Note: breaks libquotient 0.6 compatibility because of the changes to how m_currentRoom is handled
Work to add the ability to set user power levels and modify the power levels required for certain actions.
Updated

Otherwise we start loading QML before we attach to an existing instance
Not only is this wasteful but it also breaks raising the existing window on X11 since showing a window clears the startup id
This add the final list of settings in the main setting window as a new page notifications as there are quite a few now. This completes previous work on push rules giving the ability to set the default global rules. Adding keyword rules is also now supported.
This also uses the new mobileform layout. The settings are designed to give some visual feedback as options for whether notifications are on/off, play a sound or are highlighted are chosen. The left icon is designed to mimic the notification dot in the roomlist. The whole mobileform delegate can also be clicked to cycle through the available options.
The rationale for whether an option is available is as follows:
- Highlight is not available if would lead to every message in a room being highlighted
- Keyword notifications cannot be switched off instead the rule is just deleted
- Only keyword rules can be deleted, default rules cannot be touched
There is also rules plumbed in for features that don't exist in neochat yet, i.e. encrypted chats and rooms, calls. I figured I may as well plumb these in and test them my plan was to hide them before merge, they can then be unhidden when the features are complete.

Initial work to create a model so that new servers can be added to the list.
The model will also check if the server is valid before allowing it to be added.
Implements network/neochat#11
### TODO
- [x] Add functionality to cache added servers
This is the start of a significant refactoring of everything related to sending messages, which is roughly:
- the chatbox
- action handling
- message sending on the c++ side
- autocompletion of users/rooms/emojis/commands/things i forgot
Notable changes so far include:
- ChatBox is now a ColumnLayout. As part of this, i removed the height animations for now. <del>as far as i can tell, they were broken anyway.</del> I'll readd them later
- Actions were refactored to live outside of the message sending function and are now each an object; it's mostly a wrapper around a function that is executed when the action is invoked
- Everything that used to live in ChatBoxHelper is now in NeoChatRoom; that means that the exact input status (text, message being replied to, message being edited, attachment) is now saved between room switching).
- To edit/reply an event, set `NeoChatRoom::chatBox{edit,reply}Id` to the desired event id, `NeoChatRoom::chatBox{reply,edit}{User,Message}` will then be updated automatically
- Attachments behave equivalently with `NeoChatRoom::chatBoxAttachmentPath`
- Error message reporting from ActionsHandler has been fixed (same fix as in !517) and moved to NeoChatRoom
Broken at the moment:
- [x] Any kind of autocompletion
- [x] Mentions
- [x] Fancy effects
- [x] sed-style edits
- [x] last-user-message edits and replies
- [x] Some of the actions, probably
- [x] Replies from notifications
- [x] Lots of keyboard shortcuts
- [x] Custom emojis
- [x] ChatBox height animations
TODO:
- [x] User / room mentions based on QTextCursors instead of the hack we currently use
- [x] Refactor autocompletion stuff
- [x] ???
- [x] Profit
Uses Matrix's preview API to generate embedded link previews.
Only title and description for now.

This commit adds the ability to set the master push rule and set push rules for individual rooms as per the matrix spec. See https://spec.matrix.org/v1.3/client-server-api/#push-rules.
The master push rule is just on/off and uses the existing notification setting in general setting to enable/disable the server default master push rule .m.rule.master.
For each room there is now a page in the room setting that allows the following to be set:
- Default
- All messages
- @mentions and keywords
- off
New room or override rules are added/removed to achieve this.
There is also functionality to check the master/room notification state whenever the setting menu is entered. This allows the status to be updated if changed in another client or get the initial state for a room as it isn't stored.
Note - There is currently no menu items in the room list for setting the room push rule settings. This will be added in a later commit, the aim is to focus on making sure the technical implementation is good for now.
Currently when we want to show/raise the window in reaction to the tray icon/notification being clicked etc we do this by emitting a signal on the controller.
This is connected to in main.qml, which does some things, then calls back to controller to do more things.
This is quite convoluted. Instead introduce a new class WindowController that is responsible for all things window, in particular showing/raising and config saving