Skip to content
Snippets Groups Projects
Commit bd3b2f22 authored by Sébastien Blin's avatar Sébastien Blin Committed by Andreas Traczyk
Browse files

fileTransfer: add support for swarm

Change-Id: Ie22618d01a2fa6fb38ced8d2aef6f9524401ce24
parent 1355111e
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,7 @@ MessagesAdapter::setupChatView(const QString& convUid) ...@@ -96,6 +96,7 @@ MessagesAdapter::setupChatView(const QString& convUid)
&& (convInfo.isRequest || convInfo.needsSyncing)))); && (convInfo.isRequest || convInfo.needsSyncing))));
setMessagesVisibility(false); setMessagesVisibility(false);
setIsSwarm(convInfo.mode != lrc::api::conversation::Mode::NON_SWARM);
setInvitation(convInfo.isRequest or convInfo.needsSyncing, setInvitation(convInfo.isRequest or convInfo.needsSyncing,
bestName, bestName,
contactURI, contactURI,
...@@ -550,6 +551,13 @@ MessagesAdapter::setInvitation( ...@@ -550,6 +551,13 @@ MessagesAdapter::setInvitation(
QMetaObject::invokeMethod(qmlObj_, "webViewRunJavaScript", Q_ARG(QVariant, s)); 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 void
MessagesAdapter::clear() MessagesAdapter::clear()
{ {
......
...@@ -80,6 +80,7 @@ protected: ...@@ -80,6 +80,7 @@ protected:
const QString& contactId = {}, const QString& contactId = {},
bool isSwarm = false, bool isSwarm = false,
bool needsSyncing = false); bool needsSyncing = false);
void setIsSwarm(bool isSwarm);
void clear(); void clear();
void printHistory(ConversationModel& conversationModel, MessagesList interactions); void printHistory(ConversationModel& conversationModel, MessagesList interactions);
void updateHistory(ConversationModel& conversationModel, void updateHistory(ConversationModel& conversationModel,
......
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