Skip to content
Snippets Groups Projects
Commit 3f27289f authored by Sébastien Blin's avatar Sébastien Blin
Browse files

messagesadapter: do not use .arg() for printing messages

This breaks messages with %Num inside. .arg() is useful for
l20n but here we don't care as the two arguments will always be
in the same order.

GitLab: #529
Change-Id: I018bdecdf51d30be887ab4a50ef54401f2f34235
parent d058ce20
No related branches found
No related tags found
No related merge requests found
......@@ -400,9 +400,9 @@ MessagesAdapter::updateHistory(lrc::api::ConversationModel& conversationModel,
auto conversationId = lrcInstance_->get_selectedConvUid();
auto interactionsStr
= interactionsToJsonArrayObject(conversationModel, conversationId, interactions).toUtf8();
QString s = QString::fromLatin1("updateHistory(%1, %2);")
.arg(interactionsStr.constData())
.arg(allLoaded);
QString s;
QTextStream out(&s);
out << "updateHistory(" << interactionsStr << ", " << (allLoaded? "true" : "false") << ");";
QMetaObject::invokeMethod(qmlObj_, "webViewRunJavaScript", Q_ARG(QVariant, s));
conversationModel.clearUnreadInteractions(conversationId);
}
......
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