summary refs log tree commit diff
path: root/src/MatrixClient.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-11 16:00:14 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-11 16:00:14 +0300
commit18061f06002b349bdc0e5b439a84d54545b9c87e (patch)
treec58d47200c244c8005ac05e7f7f73c030943088d /src/MatrixClient.cc
parentMake explicit that MatrixClient & Cache are unique pointers (diff)
downloadnheko-18061f06002b349bdc0e5b439a84d54545b9c87e.tar.xz
Use the correct avatar size for HiDPI displays
Diffstat (limited to 'src/MatrixClient.cc')
-rw-r--r--src/MatrixClient.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc

index 6336a5cf..a9720d10 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc
@@ -59,6 +59,8 @@ MatrixClient::MatrixClient(QObject *parent) , mediaApiUrl_{"/_matrix/media/r0"} , serverProtocol_{"https"} { + qRegisterMetaType<mtx::responses::Sync>(); + QSettings settings; txn_id_ = settings.value("client/transaction_id", 1).toInt(); @@ -344,8 +346,7 @@ MatrixClient::sync() noexcept } try { - mtx::responses::Sync response = nlohmann::json::parse(data); - emit syncCompleted(response); + emit syncCompleted(nlohmann::json::parse(std::move(data))); } catch (std::exception &e) { qWarning() << "Sync error: " << e.what(); } @@ -461,7 +462,6 @@ MatrixClient::initialSync() noexcept return; } - qRegisterMetaType<mtx::responses::Sync>(); QtConcurrent::run([data = reply->readAll(), this]() { try { emit initialSyncCompleted(nlohmann::json::parse(std::move(data)));