Message menu rework

Rework the file menu so that it no longer relies on having a reference to the media delegate to manage a download for either opening externally or copying to clipboard. This allows the menus to be moved out of the delegates and maximize components and have them accessed through RoomManager. This reduces duplication and reduces the number of components in an already heavy delegate.
This commit is contained in:
James Graham
2023-09-15 13:57:40 +00:00
parent 14cdd096cf
commit 33c0cae64c
14 changed files with 305 additions and 103 deletions

View File

@@ -553,6 +553,20 @@ public:
Q_INVOKABLE QByteArray getEventJsonSource(const QString &eventId);
/**
* @brief Open the media for the given event in an appropriate external app.
*
* Will do nothing if the event has no media.
*/
Q_INVOKABLE void openEventMediaExternally(const QString &eventId);
/**
* @brief Copy the media for the given event to the clipboard.
*
* Will do nothing if the event has no media.
*/
Q_INVOKABLE void copyEventMedia(const QString &eventId);
[[nodiscard]] bool readMarkerLoaded() const;
/**