diff --git a/src/mxcimageprovider.cpp b/src/mxcimageprovider.cpp index 3fa9542829e86a71bd059b3f1867c440dc88bce7..416e76f4f876d74e8f2f006f0617ac54dff01338 100644 --- a/src/mxcimageprovider.cpp +++ b/src/mxcimageprovider.cpp @@ -26,8 +26,8 @@ void MXCImageResponse::run() { mtx::http::ThumbOpts opts; opts.mxc_url = "mxc://" + m_id.toStdString(); - opts.width = m_requestedSize.width(); - opts.height = m_requestedSize.height(); + opts.width = m_requestedSize.width() > 0 ? m_requestedSize.width() : -1; + opts.height = m_requestedSize.height() > 0 ? m_requestedSize.height() : -1; opts.method = "scale"; http::client().get_thumbnail(opts, [this, cacheFile](const std::string &res, mtx::http::RequestErr err) { if (err) { diff --git a/src/pch/mtx-pch.h b/src/pch/mtx-pch.h new file mode 100644 index 0000000000000000000000000000000000000000..99b89779396889c6ab58d276026b89dfca70a252 --- /dev/null +++ b/src/pch/mtx-pch.h @@ -0,0 +1,4 @@ +#pragma once + +#include <mtx.hpp> +#include <mtxclient/http/client.hpp>