mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-30 11:34:43 +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;
|
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 -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user