summary refs log tree commit diff
path: root/src/MatrixClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MatrixClient.cpp')
-rw-r--r--src/MatrixClient.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp

index 2ceb53a8..ea3799b6 100644 --- a/src/MatrixClient.cpp +++ b/src/MatrixClient.cpp
@@ -28,22 +28,20 @@ Q_DECLARE_METATYPE(std::vector<std::string>) Q_DECLARE_METATYPE(std::vector<QString>) Q_DECLARE_METATYPE(std::set<QString>) -namespace { -auto client_ = std::make_shared<mtx::http::Client>(); -} namespace http { mtx::http::Client * client() { + static auto client_ = std::make_shared<mtx::http::Client>(); return client_.get(); } bool is_logged_in() { - return !client_->access_token().empty(); + return !client()->access_token().empty(); } void