mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 04:37:25 +01:00
Fix crash when exiting ot of profile page while loading
This commit is contained in:
parent
116deebf87
commit
bf1036c919
@ -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 -> {
|
||||
|
Loading…
Reference in New Issue
Block a user