From b6d94382a9a35e230e45779b5637310cb4b48b25 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Sat, 3 Mar 2018 22:14:04 +0800 Subject: [PATCH] Experimental cache support. --- matrix/controller.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix/controller.cpp b/matrix/controller.cpp index 7a4af25..423e5d6 100644 --- a/matrix/controller.cpp +++ b/matrix/controller.cpp @@ -46,6 +46,7 @@ void Controller::logout() { void Controller::connected() { setUserID(m_connection->userId()); setToken(m_connection->accessToken()); + m_connection->loadState(); resync(); setIsLogin(true); } @@ -53,6 +54,7 @@ void Controller::connected() { void Controller::resync() { qDebug() << "Syncing Matrix."; m_connection->sync(30000); + m_connection->saveState(); } void Controller::reconnect() {