fix filedownload on maximized view and context menu

- move the logic for remembering local filenames from
  messagecontentmodel to neochatroom
- use it also when maximized and in context menu opening, to stop
  re-downloading
- make onFileTransferCompleted signal connection one-shot (stops memory
  leak)
This commit is contained in:
Andreas Gattringer
2024-07-16 09:52:25 +02:00
parent a101e6b0a7
commit 9dbb9c3f3b
6 changed files with 136 additions and 115 deletions

View File

@@ -579,6 +579,14 @@ public:
*/
Q_INVOKABLE QString invitingUserId() const;
/**
* @brief Return the cached file transfer information for the event.
*
* If we downloaded the file previously, return a struct with Completed status
* and the local file path stored in KSharedCOnfig
*/
Quotient::FileTransferInfo cachedFileTransferInfo(const Quotient::RoomEvent *event) const;
private:
QSet<const Quotient::RoomEvent *> highlights;