mirror of
https://github.com/neochapay/ru.neochapay.maximus.git
synced 2026-05-05 23:40:49 +00:00
[qmaxmessenger] Login/Logout
This commit is contained in:
parent
962af89df4
commit
403d543df9
4 changed files with 19 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "usersession.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QJsonArray>
|
||||
|
||||
UserSession::UserSession(QObject *parent)
|
||||
|
|
@ -76,6 +77,12 @@ void UserSession::storeToken(QString token) {
|
|||
m_settings->setValue("token", token);
|
||||
}
|
||||
|
||||
void UserSession::logout()
|
||||
{
|
||||
m_settings->reset();
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
|
||||
void UserSession::goNavigation(int from, int to)
|
||||
{
|
||||
m_actionId++;
|
||||
|
|
@ -115,6 +122,7 @@ void UserSession::updateSessionData(QJsonObject payload)
|
|||
QJsonObject profile = payload["profile"].toObject();
|
||||
|
||||
updateProfile(profile);
|
||||
emit userLogin();
|
||||
}
|
||||
|
||||
void UserSession::updateOnStartData(QJsonObject payload)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue