forked from jeena/FeedTheMonkey
Move JS into HTML and add NOT_LOGGED_IN handling
For some reason the JS never got loaded when it was in it's own file, therefor I moved it into the HTML where it gets called. Also when a session id on the server was expired or something, you weren't able to log out, there is now code which fixes that.
This commit is contained in:
parent
2c263f77db
commit
0a195f8a8f
5 changed files with 99 additions and 88 deletions
|
@ -99,6 +99,18 @@ void TinyTinyRSSLogin::reply()
|
|||
qWarning() << mLoginError;
|
||||
emit loginErrorChanged(mLoginError);
|
||||
|
||||
if(mLoginError == "NOT_LOGGED_IN") {
|
||||
mSessionId = nullptr;
|
||||
mServerUrl = nullptr;
|
||||
|
||||
QSettings settings;
|
||||
settings.remove("sessionId");
|
||||
settings.remove("serverUrl");
|
||||
settings.sync();
|
||||
|
||||
emit sessionIdChanged(mSessionId);
|
||||
}
|
||||
|
||||
} else {
|
||||
mSessionId = json.object().value("content").toObject().value("session_id").toString();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue