Fix: Set access token to work with 0.19 and add missing return statement

This commit is contained in:
tinsukE 2024-01-06 15:08:02 +01:00
parent bde6b3a753
commit 79e59b9b89

View File

@ -217,7 +217,7 @@ public class LoginActivity extends BaseActivity {
try {
JSONObject responseJSON = new JSONObject(accountResponse);
String accessToken = responseJSON.getString("jwt");
mRetrofit.setAccessToken(null);
mRetrofit.setAccessToken(accessToken);
FetchSiteInfo.fetchSiteInfo(mRetrofit.getRetrofit(), accessToken, new FetchSiteInfo.FetchSiteInfoListener() {
@Override
@ -225,6 +225,7 @@ public class LoginActivity extends BaseActivity {
if (myUserInfo == null) {
finish();
Toast.makeText(LoginActivity.this, R.string.parse_user_info_error, Toast.LENGTH_SHORT).show();
return;
}
boolean canDownvote = siteInfo.isEnable_downvotes();