mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
chatview: react to save button
Change-Id: I33717f148b837475a4f4874f327ed86de6f441cf
This commit is contained in:
parent
a7e7105cda
commit
4e3cf29eb6
3 changed files with 19 additions and 0 deletions
|
@ -227,6 +227,10 @@ Rectangle {
|
|||
messageWebViewRect.messagesLoaded()
|
||||
}
|
||||
|
||||
function copyToDownloads(interactionId, displayName) {
|
||||
MessagesAdapter.copyToDownloads(interactionId, displayName)
|
||||
}
|
||||
|
||||
function emitPasteKeyDetected() {
|
||||
MessagesAdapter.pasteKeyDetected()
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "utils.h"
|
||||
#include "webchathelpers.h"
|
||||
|
||||
#include <api/datatransfermodel.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDesktopServices>
|
||||
|
@ -368,6 +370,18 @@ MessagesAdapter::retryInteraction(const QString& interactionId)
|
|||
->retryInteraction(lrcInstance_->get_selectedConvUid(), interactionId);
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::copyToDownloads(const QString& interactionId, const QString& displayName)
|
||||
{
|
||||
auto downloadDir = lrcInstance_->accountModel().downloadDirectory;
|
||||
if (auto accInfo = &lrcInstance_->getCurrentAccountInfo())
|
||||
accInfo->dataTransferModel->copyTo(lrcInstance_->getCurrentAccountId(),
|
||||
lrcInstance_->get_selectedConvUid(),
|
||||
interactionId,
|
||||
downloadDir,
|
||||
displayName);
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::setNewMessagesContent(const QString& path)
|
||||
{
|
||||
|
|
|
@ -67,6 +67,7 @@ protected:
|
|||
Q_INVOKABLE void pasteKeyDetected();
|
||||
Q_INVOKABLE void onComposing(bool isComposing);
|
||||
Q_INVOKABLE void loadMessages(int n);
|
||||
Q_INVOKABLE void copyToDownloads(const QString& interactionId, const QString& displayName);
|
||||
|
||||
// Manually update draft when hiding message web view (Back to welcome page).
|
||||
Q_INVOKABLE void updateDraft();
|
||||
|
|
Loading…
Add table
Reference in a new issue