mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 14:55:43 +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()
|
messageWebViewRect.messagesLoaded()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function copyToDownloads(interactionId, displayName) {
|
||||||
|
MessagesAdapter.copyToDownloads(interactionId, displayName)
|
||||||
|
}
|
||||||
|
|
||||||
function emitPasteKeyDetected() {
|
function emitPasteKeyDetected() {
|
||||||
MessagesAdapter.pasteKeyDetected()
|
MessagesAdapter.pasteKeyDetected()
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "webchathelpers.h"
|
#include "webchathelpers.h"
|
||||||
|
|
||||||
|
#include <api/datatransfermodel.h>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
@ -368,6 +370,18 @@ MessagesAdapter::retryInteraction(const QString& interactionId)
|
||||||
->retryInteraction(lrcInstance_->get_selectedConvUid(), 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
|
void
|
||||||
MessagesAdapter::setNewMessagesContent(const QString& path)
|
MessagesAdapter::setNewMessagesContent(const QString& path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,6 +67,7 @@ protected:
|
||||||
Q_INVOKABLE void pasteKeyDetected();
|
Q_INVOKABLE void pasteKeyDetected();
|
||||||
Q_INVOKABLE void onComposing(bool isComposing);
|
Q_INVOKABLE void onComposing(bool isComposing);
|
||||||
Q_INVOKABLE void loadMessages(int n);
|
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).
|
// Manually update draft when hiding message web view (Back to welcome page).
|
||||||
Q_INVOKABLE void updateDraft();
|
Q_INVOKABLE void updateDraft();
|
||||||
|
|
Loading…
Add table
Reference in a new issue