mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 05:19:49 +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;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(this, miscPlugin, onLinkLongClickListener);
|
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(getApplication(), miscPlugin, onLinkLongClickListener);
|
||||||
|
|
||||||
descriptionTextView.setOnLongClickListener(view -> {
|
descriptionTextView.setOnLongClickListener(view -> {
|
||||||
if (description != null && !description.equals("") && descriptionTextView.getSelectionStart() == -1 && descriptionTextView.getSelectionEnd() == -1) {
|
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);
|
urlMenuBottomSheetFragment.show(getSupportFragmentManager(), null);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(this, miscPlugin, onLinkLongClickListener);
|
Markwon markwon = MarkdownUtils.createDescriptionMarkwon(getApplication(), miscPlugin, onLinkLongClickListener);
|
||||||
|
|
||||||
descriptionTextView.setOnLongClickListener(view -> {
|
descriptionTextView.setOnLongClickListener(view -> {
|
||||||
if (description != null && !description.equals("") && descriptionTextView.getSelectionStart() == -1 && descriptionTextView.getSelectionEnd() == -1) {
|
if (description != null && !description.equals("") && descriptionTextView.getSelectionStart() == -1 && descriptionTextView.getSelectionEnd() == -1) {
|
||||||
|
@@ -59,7 +59,7 @@ public class MarkdownUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static Markwon createDescriptionMarkwon(Context context, MarkwonPlugin miscPlugin,
|
public static Markwon createDescriptionMarkwon(Application context, MarkwonPlugin miscPlugin,
|
||||||
BetterLinkMovementMethod.OnLinkLongClickListener onLinkLongClickListener) {
|
BetterLinkMovementMethod.OnLinkLongClickListener onLinkLongClickListener) {
|
||||||
return Markwon.builder(context)
|
return Markwon.builder(context)
|
||||||
.usePlugin(MarkwonInlineParserPlugin.create(plugin -> {
|
.usePlugin(MarkwonInlineParserPlugin.create(plugin -> {
|
||||||
|
Reference in New Issue
Block a user