Skip to content

Commit

Permalink
Merge pull request #4895 from dmitrio95/save-tokens-immediately
Browse files Browse the repository at this point in the history
Save login information immediately
  • Loading branch information
anatoly-os committed Apr 11, 2019
2 parents 90ac531 + d056b28 commit c309290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@ void MuseScore::closeEvent(QCloseEvent* ev)

writeSettings();

_loginManager->save();

ev->accept();

if (Shortcut::dirty)
Expand Down
4 changes: 4 additions & 0 deletions mscore/network/loginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ void LoginManager::onLoginReply(QNetworkReply* reply, int code, const QJsonObjec
}
else
emit loginError(getErrorString(reply, obj));

save();
}

//---------------------------------------------------------
Expand All @@ -455,6 +457,8 @@ void LoginManager::onLoginRefreshReply(QNetworkReply* reply, int code, const QJs
_accessToken.clear();
_refreshToken.clear();
}

save();
}

//---------------------------------------------------------
Expand Down

0 comments on commit c309290

Please sign in to comment.