mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Fix crash when exiting ot of profile page while loading
This commit is contained in:
@@ -531,7 +531,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
||||
return true;
|
||||
};
|
||||
|
||||
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(this, miscPlugin, onLinkLongClickListener);
|
||||
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(getApplication(), miscPlugin, onLinkLongClickListener);
|
||||
|
||||
descriptionTextView.setOnLongClickListener(view -> {
|
||||
if (description != null && !description.equals("") && descriptionTextView.getSelectionStart() == -1 && descriptionTextView.getSelectionEnd() == -1) {
|
||||
|
@@ -458,7 +458,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
urlMenuBottomSheetFragment.show(getSupportFragmentManager(), null);
|
||||
return true;
|
||||
};
|
||||
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(this, miscPlugin, onLinkLongClickListener);
|
||||
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(getApplication(), miscPlugin, onLinkLongClickListener);
|
||||
|
||||
descriptionTextView.setOnLongClickListener(view -> {
|
||||
if (description != null && !description.equals("") && descriptionTextView.getSelectionStart() == -1 && descriptionTextView.getSelectionEnd() == -1) {
|
||||
|
@@ -59,7 +59,7 @@ public class MarkdownUtils {
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Markwon createDescriptionMarkwon(Context context, MarkwonPlugin miscPlugin,
|
||||
public static Markwon createDescriptionMarkwon(Application context, MarkwonPlugin miscPlugin,
|
||||
BetterLinkMovementMethod.OnLinkLongClickListener onLinkLongClickListener) {
|
||||
return Markwon.builder(context)
|
||||
.usePlugin(MarkwonInlineParserPlugin.create(plugin -> {
|
||||
|
Reference in New Issue
Block a user