mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Merge pull request #1833 from Integral-Tech/refactor-string-conversion
refactor: use fmt lib to avoid back-and-forth conversion
This commit is contained in:
commit
1a00d91316
1 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,8 @@
|
|||
#include <QVideoFrame>
|
||||
#include <QVideoSink>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <mtx/responses/common.hpp>
|
||||
|
@ -578,8 +580,7 @@ InputBar::message(const QString &msg, MarkdownOverride useMarkdown, bool rainbow
|
|||
}
|
||||
}
|
||||
|
||||
text.body =
|
||||
QStringLiteral("%1\n%2").arg(body, QString::fromStdString(text.body)).toStdString();
|
||||
text.body = fmt::format("{}\n{}", body.toStdString(), text.body);
|
||||
|
||||
// NOTE(Nico): rich replies always need a formatted_body!
|
||||
text.format = "org.matrix.custom.html";
|
||||
|
|
Loading…
Reference in a new issue