mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-03-20 09:09:52 +01:00
Fix: Set access token to work with 0.19 and add missing return statement
This commit is contained in:
parent
bde6b3a753
commit
79e59b9b89
@ -217,7 +217,7 @@ public class LoginActivity extends BaseActivity {
|
|||||||
try {
|
try {
|
||||||
JSONObject responseJSON = new JSONObject(accountResponse);
|
JSONObject responseJSON = new JSONObject(accountResponse);
|
||||||
String accessToken = responseJSON.getString("jwt");
|
String accessToken = responseJSON.getString("jwt");
|
||||||
mRetrofit.setAccessToken(null);
|
mRetrofit.setAccessToken(accessToken);
|
||||||
|
|
||||||
FetchSiteInfo.fetchSiteInfo(mRetrofit.getRetrofit(), accessToken, new FetchSiteInfo.FetchSiteInfoListener() {
|
FetchSiteInfo.fetchSiteInfo(mRetrofit.getRetrofit(), accessToken, new FetchSiteInfo.FetchSiteInfoListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -225,6 +225,7 @@ public class LoginActivity extends BaseActivity {
|
|||||||
if (myUserInfo == null) {
|
if (myUserInfo == null) {
|
||||||
finish();
|
finish();
|
||||||
Toast.makeText(LoginActivity.this, R.string.parse_user_info_error, Toast.LENGTH_SHORT).show();
|
Toast.makeText(LoginActivity.this, R.string.parse_user_info_error, Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean canDownvote = siteInfo.isEnable_downvotes();
|
boolean canDownvote = siteInfo.isEnable_downvotes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user