refactor: use fmt lib to avoid back-and-forth conversion

pull/1833/head
Integral 1 month ago
parent 2f967978f2
commit b7a5d714c6
No known key found for this signature in database
GPG Key ID: 06313911057DD5A8
  1. 5
      src/timeline/InputBar.cpp

@ -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…
Cancel
Save