Ensure that user choice is given precedent for opening/closing the room drawer.
This makes it so that the previous state is restored after one of the menu pages is closed or if the window is dragged thin then wide again.
Fixesnetwork/neochat#196
The aim here is to tidy up the reply component and make it so it sizes automatically without any need to manually set widths or heights. This is achieved by putting the layout in a grid layout. The implicitwidth and height variables are also simplified meaning that the margins are no longer prone to being slightly off because the calculation didn't add up the margins and spacing right.
Also added here is a mime component which is used to provide a nicer representation for files, videos and audio in the reply because trying to put the full component in wouldn't look good.
This also fixes the situation in right to left mode where the layout now mirror properly and everything sits where it should.
New reply elements

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
As discussed in network/neochat#161, when clicking the image it now only covers the neochat window. A modal popup that covers the neochat window is now used. The app behind get dimmed.
Left clicking anywhere closes the preview as well as the using the close button. Right clicking on the image itself still gives the image's context menu.
Before

After

Latest

Closesnetwork/neochat#161
After the readmarker is removed it leaves a gap in the indexs until the model is refreshed.
Add check to ignore the gap for the purpose of show author and show section roles.
Closesnetwork/neochat#295
BUG: 454885
Convert to rowLayout so that the bubble header works in right to left mode.
Before

After

Add a temporary highlight when the goToEvent is triggered.
This implementation also alows a temporary highlight of an item at anytime if the timeline container's isTemporaryHighlighted property is set to true.
Closesnetwork/neochat#34
This makes (https) links show up as actual links when they're in a message with a `formatted_body`. For example, the pursuivant messages in any KDE channel (like #kirigami), or links which are in a reply to another message/image.
Also corrected a regex mistake in another place using the same link replacement regex.
Fix#331
Moves the highlight to the timeline container object itself so the whole delegate is highlighted. This was suggested for compact mode but I also left it visible for bubble as I think it still works and adds some user feedback.
Fine tunes the hover actions as follows:
- In compact mode as long as the screen is wide enough they are inset further so they don't overlap the up and down buttons.
- In bubble mode for a user message on the right they are inset slightly further so that they don't overlap the scrollbar
Fine tuned the spacing around the avatar and highlight.
Based upon the suggestions here network/neochat#550
Bubble Before - no highlight can be seen

Bubble After

Compact Before

Compact After
