This is only really needed in specific cases, e.g. localUser which isn't
attached to a connection and thus needs a little help. Notes for when
this is needed is added for future readers.
(cherry picked from commit ef953b7574)
The problem lies in how media URLs work, in this case it the old
NeoChatRoom::avatarMediaId could pass a mxc url *or* a path that can
be put into root.connection.makeMediaUrl. So normal rooms with avatars
loaded, but never friends because room members gave the mxc URL.
Instead, change everything to use avatarMediaUrl which corrects this
issue by always passing a mxc URL to QML. This also removes the need to
call makeMediaUrl.
Fixes#675
(cherry picked from commit 6b79795229)
This was never ported from the Qt labs platform FileDialog, because
currentFile doesn't exist anymore. It's now called selectedFile.
(cherry picked from commit 31ef0a5223)
"Room ID or Alias" is duplicated twice here, once in the dialog title
and a second time as the label for the text field. Let's change it to a
more suitable name "Manually Enter a Room".
This adds a short explanatory label to the "Enter a room address" button
in this list, in case the user does not know where to find their room
address.
Also changes the name of the button to "Enter a Room Manually" to refer
that you can enter aliases here as well.
Currently the page experienc on mobile is suboptimal as back gestures do not work and the startup behaviour is not ideal.
This reworks it so that pages are now pushed as a layer on mobile and at startup only a saved space is restored. It is also setup so that on mobile you'll never see a blank room page (like when you select friends or home).
Make sure that the search filter is removed when another button is pressed.
Make sure that the popup closes when one of the other menus is open.
Make the separator is at the top on NavigationTabBar
A separator has been added to the drawer view's left side, and the position of the NavigationTabBar has been set so it correctly draws the separator at the top and not the bottom.
Rework notifications manager to no longer be a singleton, but a component of controller.
The dependency on it for neochat room and connection is also removed.
Rework ActionsHandler as static helper functions.
The functions are now invoked from ChatBarCache so there is no need to pass an actions handler object around qml simplifying the code.
Have controller link to neochatconnection for errorOccured rather than call directly to remove dependency on controller.
For all the same reasons as network/neochat!1926
Move showMessage to RoomManager and merge warning in. A new Message type enum is created aligned with the Kirgami.MessageType used by Kirigami.Banner to avoid needing to translate from 2 enums.
showMessage is also sent as a signal from NeoChatRoom (and via the room from ActionsModel), this removes the need for them to have a dependency on Controller (and RoomManager). While not necessarily the cause of Windows crashes the spaghetti dependencies of RoomManager and Controller throughout the code base has made debugging that harder so this aims to simplify that as well.
The default timeout is a bit long, "short" is 3 seconds shorter than the
default. For long-term network errors, we have a banner telling you so
anyway. This should hopefully reduce the notification spam when you have
temporary network dropouts.