mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Merge branch 'feature/bugfixes'
This commit is contained in:
commit
a82f2b68e3
@ -1,7 +1,6 @@
|
|||||||
package eu.toldi.infinityforlemmy;
|
package eu.toldi.infinityforlemmy;
|
||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.text.Html;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -9,9 +8,6 @@ import org.json.JSONException;
|
|||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import eu.toldi.infinityforlemmy.apis.LemmyAPI;
|
import eu.toldi.infinityforlemmy.apis.LemmyAPI;
|
||||||
import eu.toldi.infinityforlemmy.apis.RedditAPI;
|
|
||||||
import eu.toldi.infinityforlemmy.utils.APIUtils;
|
|
||||||
import eu.toldi.infinityforlemmy.utils.JSONUtils;
|
|
||||||
import eu.toldi.infinityforlemmy.utils.LemmyUtils;
|
import eu.toldi.infinityforlemmy.utils.LemmyUtils;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@ -83,7 +79,7 @@ public class FetchMyInfo {
|
|||||||
if (!person.isNull("banner")) {
|
if (!person.isNull("banner")) {
|
||||||
bannerImageUrl = person.getString("banner");
|
bannerImageUrl = person.getString("banner");
|
||||||
}
|
}
|
||||||
display_name = person.getString("name");
|
display_name = (person.has("display_name")) ? person.getString("display_name") : person.getString("name");
|
||||||
redditDataRoomDatabase.accountDao().updateAccountInfo(name, profileImageUrl, bannerImageUrl);
|
redditDataRoomDatabase.accountDao().updateAccountInfo(name, profileImageUrl, bannerImageUrl);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
parseFailed = true;
|
parseFailed = true;
|
||||||
|
@ -91,8 +91,10 @@ public class LinkResolverActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
((Infinity) getApplication()).getAppComponent().inject(this);
|
((Infinity) getApplication()).getAppComponent().inject(this);
|
||||||
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
|
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
|
||||||
String instance = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_INSTANCE, null);
|
if (mAccessToken != null) {
|
||||||
mRetrofit.setBaseURL(instance);
|
String instance = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_INSTANCE, null);
|
||||||
|
mRetrofit.setBaseURL(instance);
|
||||||
|
}
|
||||||
|
|
||||||
Uri uri = getIntent().getData();
|
Uri uri = getIntent().getData();
|
||||||
if (uri == null) {
|
if (uri == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user