From 3d3285d1ee58edffe36367cf63d4437e41de81d8 Mon Sep 17 00:00:00 2001 From: Bazsalanszky Date: Sun, 21 Jul 2024 11:40:04 +0200 Subject: [PATCH] Fix CRASH on CommentActivity --- .../toldi/infinityforlemmy/activities/CommentActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/CommentActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/CommentActivity.java index 88f14992..d5896118 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/CommentActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/CommentActivity.java @@ -204,6 +204,9 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA builder.linkColor(linkColor); } }; + + mGlide = Glide.with(getApplication()); + Markwon postBodyMarkwon = MarkdownUtils.createFullRedditMarkwon(this, miscPlugin, parentTextColor, parentSpoilerBackgroundColor, mGlide, null, mSharedPreferences.getBoolean(SharedPreferencesUtils.DISABLE_IMAGE_PREVIEW, false)); MarkwonAdapter markwonAdapter = MarkdownUtils.createTablesAdapter(); @@ -226,8 +229,6 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA setSupportActionBar(binding.commentToolbar); - mGlide = Glide.with(getApplication()); - if (savedInstanceState != null) { selectedAccount = savedInstanceState.getParcelable(SELECTED_ACCOUNT_STATE); uploadedImages = savedInstanceState.getParcelableArrayList(UPLOADED_IMAGES_STATE);