Skip to content
Snippets Groups Projects
Unverified Commit 7ccfd469 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

messagesadapter: re-add isSwarm

This show "Copy to Downloads" for file transfer in swarm.

Change-Id: I7002ce22898ced361ca3df1fa535dd7ec88e0d70
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
parent 748e161b
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ MessagesAdapter::setupChatView(const QVariantMap& convInfo)
Utils::oneShotConnect(qmlObj_, SIGNAL(messagesCleared()), this, SLOT(slotMessagesCleared()));
setMessagesVisibility(false);
clearChatView();
setIsSwarm(convInfo["isSwarm"].toBool());
Q_EMIT newMessageBarPlaceholderText(convInfo["title"].toString());
}
......@@ -374,6 +375,13 @@ MessagesAdapter::setMessagesVisibility(bool visible)
QMetaObject::invokeMethod(qmlObj_, "webViewRunJavaScript", Q_ARG(QVariant, s));
}
void
MessagesAdapter::setIsSwarm(bool isSwarm)
{
QString s = QString::fromLatin1("set_is_swarm(%1)").arg(isSwarm);
QMetaObject::invokeMethod(qmlObj_, "webViewRunJavaScript", Q_ARG(QVariant, s));
}
void
MessagesAdapter::clearChatView()
{
......
......@@ -69,6 +69,7 @@ protected:
// Run corrsponding js functions, c++ to qml.
void setMessagesVisibility(bool visible);
void setIsSwarm(bool isSwarm);
void clearChatView();
void updateHistory(ConversationModel& conversationModel,
MessagesList interactions,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment