mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 05:19:49 +02:00
Render full markdown in CommentsListingRecyclerViewAdapter.
This commit is contained in:
@@ -248,13 +248,13 @@ public class AccountSavedThingActivity extends BaseActivity implements ActivityT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lockSwipeRightToGoBack() {
|
public void lockSwipeRightToGoBack() {
|
||||||
if (mSlidrInterface != null) {
|
if (mSlidrInterface != null) {
|
||||||
mSlidrInterface.lock();
|
mSlidrInterface.lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unlockSwipeRightToGoBack() {
|
public void unlockSwipeRightToGoBack() {
|
||||||
if (mSlidrInterface != null) {
|
if (mSlidrInterface != null) {
|
||||||
mSlidrInterface.unlock();
|
mSlidrInterface.unlock();
|
||||||
}
|
}
|
||||||
|
@@ -1755,13 +1755,13 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lockSwipeRightToGoBack() {
|
public void lockSwipeRightToGoBack() {
|
||||||
if (mSlidrInterface != null) {
|
if (mSlidrInterface != null) {
|
||||||
mSlidrInterface.lock();
|
mSlidrInterface.lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unlockSwipeRightToGoBack() {
|
public void unlockSwipeRightToGoBack() {
|
||||||
if (mSlidrInterface != null) {
|
if (mSlidrInterface != null) {
|
||||||
mSlidrInterface.unlock();
|
mSlidrInterface.unlock();
|
||||||
}
|
}
|
||||||
|
@@ -3,9 +3,11 @@ package ml.docilealligator.infinityforreddit.adapters;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Spanned;
|
||||||
import android.text.util.Linkify;
|
import android.text.util.Linkify;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -26,6 +28,8 @@ import androidx.recyclerview.widget.DiffUtil;
|
|||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import org.commonmark.ext.gfm.tables.TableBlock;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
@@ -42,20 +46,28 @@ import io.noties.markwon.inlineparser.BangInlineProcessor;
|
|||||||
import io.noties.markwon.inlineparser.HtmlInlineProcessor;
|
import io.noties.markwon.inlineparser.HtmlInlineProcessor;
|
||||||
import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin;
|
import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin;
|
||||||
import io.noties.markwon.linkify.LinkifyPlugin;
|
import io.noties.markwon.linkify.LinkifyPlugin;
|
||||||
|
import io.noties.markwon.movement.MovementMethodPlugin;
|
||||||
|
import io.noties.markwon.recycler.table.TableEntry;
|
||||||
|
import io.noties.markwon.recycler.table.TableEntryPlugin;
|
||||||
import me.saket.bettermovementmethod.BetterLinkMovementMethod;
|
import me.saket.bettermovementmethod.BetterLinkMovementMethod;
|
||||||
import ml.docilealligator.infinityforreddit.NetworkState;
|
import ml.docilealligator.infinityforreddit.NetworkState;
|
||||||
import ml.docilealligator.infinityforreddit.R;
|
import ml.docilealligator.infinityforreddit.R;
|
||||||
import ml.docilealligator.infinityforreddit.SaveThing;
|
import ml.docilealligator.infinityforreddit.SaveThing;
|
||||||
import ml.docilealligator.infinityforreddit.VoteThing;
|
import ml.docilealligator.infinityforreddit.VoteThing;
|
||||||
|
import ml.docilealligator.infinityforreddit.activities.AccountSavedThingActivity;
|
||||||
import ml.docilealligator.infinityforreddit.activities.BaseActivity;
|
import ml.docilealligator.infinityforreddit.activities.BaseActivity;
|
||||||
import ml.docilealligator.infinityforreddit.activities.LinkResolverActivity;
|
import ml.docilealligator.infinityforreddit.activities.LinkResolverActivity;
|
||||||
import ml.docilealligator.infinityforreddit.activities.ViewPostDetailActivity;
|
import ml.docilealligator.infinityforreddit.activities.ViewPostDetailActivity;
|
||||||
import ml.docilealligator.infinityforreddit.activities.ViewSubredditDetailActivity;
|
import ml.docilealligator.infinityforreddit.activities.ViewSubredditDetailActivity;
|
||||||
|
import ml.docilealligator.infinityforreddit.activities.ViewUserDetailActivity;
|
||||||
import ml.docilealligator.infinityforreddit.bottomsheetfragments.CommentMoreBottomSheetFragment;
|
import ml.docilealligator.infinityforreddit.bottomsheetfragments.CommentMoreBottomSheetFragment;
|
||||||
import ml.docilealligator.infinityforreddit.bottomsheetfragments.UrlMenuBottomSheetFragment;
|
import ml.docilealligator.infinityforreddit.bottomsheetfragments.UrlMenuBottomSheetFragment;
|
||||||
import ml.docilealligator.infinityforreddit.comment.Comment;
|
import ml.docilealligator.infinityforreddit.comment.Comment;
|
||||||
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
||||||
import ml.docilealligator.infinityforreddit.customviews.CommentIndentationView;
|
import ml.docilealligator.infinityforreddit.customviews.CommentIndentationView;
|
||||||
|
import ml.docilealligator.infinityforreddit.customviews.CustomMarkwonAdapter;
|
||||||
|
import ml.docilealligator.infinityforreddit.customviews.LinearLayoutManagerBugFixed;
|
||||||
|
import ml.docilealligator.infinityforreddit.customviews.MarkwonLinearLayoutManager;
|
||||||
import ml.docilealligator.infinityforreddit.customviews.SpoilerOnClickTextView;
|
import ml.docilealligator.infinityforreddit.customviews.SpoilerOnClickTextView;
|
||||||
import ml.docilealligator.infinityforreddit.markdown.SpoilerParserPlugin;
|
import ml.docilealligator.infinityforreddit.markdown.SpoilerParserPlugin;
|
||||||
import ml.docilealligator.infinityforreddit.markdown.SuperscriptInlineProcessor;
|
import ml.docilealligator.infinityforreddit.markdown.SuperscriptInlineProcessor;
|
||||||
@@ -83,6 +95,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
private Retrofit mOauthRetrofit;
|
private Retrofit mOauthRetrofit;
|
||||||
private Locale mLocale;
|
private Locale mLocale;
|
||||||
private Markwon mMarkwon;
|
private Markwon mMarkwon;
|
||||||
|
private RecyclerView.RecycledViewPool recycledViewPool;
|
||||||
private String mAccessToken;
|
private String mAccessToken;
|
||||||
private String mAccountName;
|
private String mAccountName;
|
||||||
private int mColorPrimaryLightTheme;
|
private int mColorPrimaryLightTheme;
|
||||||
@@ -115,43 +128,6 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
mOauthRetrofit = oauthRetrofit;
|
mOauthRetrofit = oauthRetrofit;
|
||||||
mCommentColor = customThemeWrapper.getCommentColor();
|
mCommentColor = customThemeWrapper.getCommentColor();
|
||||||
int commentSpoilerBackgroundColor = mCommentColor | 0xFF000000;
|
int commentSpoilerBackgroundColor = mCommentColor | 0xFF000000;
|
||||||
mMarkwon = Markwon.builder(mActivity)
|
|
||||||
.usePlugin(MarkwonInlineParserPlugin.create(plugin -> {
|
|
||||||
plugin.excludeInlineProcessor(AutolinkInlineProcessor.class);
|
|
||||||
plugin.excludeInlineProcessor(HtmlInlineProcessor.class);
|
|
||||||
plugin.excludeInlineProcessor(BangInlineProcessor.class);
|
|
||||||
plugin.addInlineProcessor(new SuperscriptInlineProcessor());
|
|
||||||
}))
|
|
||||||
.usePlugin(HtmlPlugin.create(plugin -> {
|
|
||||||
plugin.excludeDefaults(true).addHandler(new SuperScriptHandler());
|
|
||||||
}))
|
|
||||||
.usePlugin(new AbstractMarkwonPlugin() {
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public String processMarkdown(@NonNull String markdown) {
|
|
||||||
return Utils.fixSuperScript(markdown);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
|
||||||
builder.linkColor(customThemeWrapper.getLinkColor());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configureConfiguration(@NonNull MarkwonConfiguration.Builder builder) {
|
|
||||||
builder.linkResolver((view, link) -> {
|
|
||||||
Intent intent = new Intent(mActivity, LinkResolverActivity.class);
|
|
||||||
Uri uri = Uri.parse(link);
|
|
||||||
intent.setData(uri);
|
|
||||||
mActivity.startActivity(intent);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.usePlugin(SpoilerParserPlugin.create(mCommentColor, commentSpoilerBackgroundColor))
|
|
||||||
.usePlugin(LinkifyPlugin.create(Linkify.WEB_URLS))
|
|
||||||
.usePlugin(StrikethroughPlugin.create())
|
|
||||||
.build();
|
|
||||||
mLocale = locale;
|
mLocale = locale;
|
||||||
mAccessToken = accessToken;
|
mAccessToken = accessToken;
|
||||||
mAccountName = accountName;
|
mAccountName = accountName;
|
||||||
@@ -174,6 +150,64 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
mButtonTextColor = customThemeWrapper.getButtonTextColor();
|
mButtonTextColor = customThemeWrapper.getButtonTextColor();
|
||||||
mColorAccent = customThemeWrapper.getColorAccent();
|
mColorAccent = customThemeWrapper.getColorAccent();
|
||||||
mCommentIconAndInfoColor = customThemeWrapper.getCommentIconAndInfoColor();
|
mCommentIconAndInfoColor = customThemeWrapper.getCommentIconAndInfoColor();
|
||||||
|
int linkColor = customThemeWrapper.getLinkColor();
|
||||||
|
mMarkwon = Markwon.builder(mActivity)
|
||||||
|
.usePlugin(MarkwonInlineParserPlugin.create(plugin -> {
|
||||||
|
plugin.excludeInlineProcessor(AutolinkInlineProcessor.class);
|
||||||
|
plugin.excludeInlineProcessor(HtmlInlineProcessor.class);
|
||||||
|
plugin.excludeInlineProcessor(BangInlineProcessor.class);
|
||||||
|
plugin.addInlineProcessor(new SuperscriptInlineProcessor());
|
||||||
|
}))
|
||||||
|
.usePlugin(HtmlPlugin.create(plugin -> {
|
||||||
|
plugin.excludeDefaults(true).addHandler(new SuperScriptHandler());
|
||||||
|
}))
|
||||||
|
.usePlugin(new AbstractMarkwonPlugin() {
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String processMarkdown(@NonNull String markdown) {
|
||||||
|
return Utils.fixSuperScript(markdown);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeSetText(@NonNull TextView textView, @NonNull Spanned markdown) {
|
||||||
|
if (mActivity.contentTypeface != null) {
|
||||||
|
textView.setTypeface(mActivity.contentTypeface);
|
||||||
|
}
|
||||||
|
textView.setTextColor(mCommentColor);
|
||||||
|
textView.setHighlightColor(Color.TRANSPARENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configureConfiguration(@NonNull MarkwonConfiguration.Builder builder) {
|
||||||
|
builder.linkResolver((view, link) -> {
|
||||||
|
Intent intent = new Intent(mActivity, LinkResolverActivity.class);
|
||||||
|
Uri uri = Uri.parse(link);
|
||||||
|
intent.setData(uri);
|
||||||
|
mActivity.startActivity(intent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
||||||
|
builder.linkColor(linkColor);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.usePlugin(SpoilerParserPlugin.create(mCommentColor, commentSpoilerBackgroundColor))
|
||||||
|
.usePlugin(StrikethroughPlugin.create())
|
||||||
|
.usePlugin(MovementMethodPlugin.create(BetterLinkMovementMethod.linkify(Linkify.WEB_URLS).setOnLinkLongClickListener((textView, url) -> {
|
||||||
|
if (!activity.isDestroyed() && !activity.isFinishing()) {
|
||||||
|
UrlMenuBottomSheetFragment urlMenuBottomSheetFragment = new UrlMenuBottomSheetFragment();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString(UrlMenuBottomSheetFragment.EXTRA_URL, url);
|
||||||
|
urlMenuBottomSheetFragment.setArguments(bundle);
|
||||||
|
urlMenuBottomSheetFragment.show(activity.getSupportFragmentManager(), urlMenuBottomSheetFragment.getTag());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
})))
|
||||||
|
.usePlugin(LinkifyPlugin.create(Linkify.WEB_URLS))
|
||||||
|
.usePlugin(TableEntryPlugin.create(mActivity))
|
||||||
|
.build();
|
||||||
|
recycledViewPool = new RecyclerView.RecycledViewPool();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -217,7 +251,8 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
Utils.setHTMLWithImageToTextView(((CommentViewHolder) holder).awardsTextView, comment.getAwards(), true);
|
Utils.setHTMLWithImageToTextView(((CommentViewHolder) holder).awardsTextView, comment.getAwards(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mMarkwon.setMarkdown(((CommentViewHolder) holder).commentMarkdownView, comment.getCommentMarkdown());
|
((CommentViewHolder) holder).markwonAdapter.setMarkdown(mMarkwon, comment.getCommentMarkdown());
|
||||||
|
((CommentViewHolder) holder).markwonAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
|
((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
|
||||||
comment.getScore() + comment.getVoteType()));
|
comment.getScore() + comment.getVoteType()));
|
||||||
@@ -353,7 +388,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
@BindView(R.id.awards_text_view_item_comment)
|
@BindView(R.id.awards_text_view_item_comment)
|
||||||
TextView awardsTextView;
|
TextView awardsTextView;
|
||||||
@BindView(R.id.comment_markdown_view_item_post_comment)
|
@BindView(R.id.comment_markdown_view_item_post_comment)
|
||||||
SpoilerOnClickTextView commentMarkdownView;
|
RecyclerView commentMarkdownView;
|
||||||
@BindView(R.id.bottom_constraint_layout_item_post_comment)
|
@BindView(R.id.bottom_constraint_layout_item_post_comment)
|
||||||
ConstraintLayout bottomConstraintLayout;
|
ConstraintLayout bottomConstraintLayout;
|
||||||
@BindView(R.id.up_vote_button_item_post_comment)
|
@BindView(R.id.up_vote_button_item_post_comment)
|
||||||
@@ -374,6 +409,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
ImageView replyButton;
|
ImageView replyButton;
|
||||||
@BindView(R.id.divider_item_comment)
|
@BindView(R.id.divider_item_comment)
|
||||||
View commentDivider;
|
View commentDivider;
|
||||||
|
CustomMarkwonAdapter markwonAdapter;
|
||||||
|
|
||||||
CommentViewHolder(View itemView) {
|
CommentViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
@@ -435,15 +471,11 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
awardsTextView.setTypeface(mActivity.typeface);
|
awardsTextView.setTypeface(mActivity.typeface);
|
||||||
scoreTextView.setTypeface(mActivity.typeface);
|
scoreTextView.setTypeface(mActivity.typeface);
|
||||||
}
|
}
|
||||||
if (mActivity.contentTypeface != null) {
|
|
||||||
commentMarkdownView.setTypeface(mActivity.typeface);
|
|
||||||
}
|
|
||||||
itemView.setBackgroundColor(mCommentBackgroundColor);
|
itemView.setBackgroundColor(mCommentBackgroundColor);
|
||||||
authorTextView.setTextColor(mUsernameColor);
|
authorTextView.setTextColor(mUsernameColor);
|
||||||
authorFlairTextView.setTextColor(mAuthorFlairColor);
|
authorFlairTextView.setTextColor(mAuthorFlairColor);
|
||||||
commentTimeTextView.setTextColor(mSecondaryTextColor);
|
commentTimeTextView.setTextColor(mSecondaryTextColor);
|
||||||
awardsTextView.setTextColor(mSecondaryTextColor);
|
awardsTextView.setTextColor(mSecondaryTextColor);
|
||||||
commentMarkdownView.setTextColor(mCommentColor);
|
|
||||||
upvoteButton.setColorFilter(mCommentIconAndInfoColor, PorterDuff.Mode.SRC_IN);
|
upvoteButton.setColorFilter(mCommentIconAndInfoColor, PorterDuff.Mode.SRC_IN);
|
||||||
scoreTextView.setTextColor(mCommentIconAndInfoColor);
|
scoreTextView.setTextColor(mCommentIconAndInfoColor);
|
||||||
downvoteButton.setColorFilter(mCommentIconAndInfoColor, PorterDuff.Mode.SRC_IN);
|
downvoteButton.setColorFilter(mCommentIconAndInfoColor, PorterDuff.Mode.SRC_IN);
|
||||||
@@ -500,24 +532,43 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
commentMarkdownView.setOnClickListener(view -> {
|
commentMarkdownView.setRecycledViewPool(recycledViewPool);
|
||||||
if (commentMarkdownView.isSpoilerOnClick()) {
|
LinearLayoutManagerBugFixed linearLayoutManager = new MarkwonLinearLayoutManager(mActivity, new MarkwonLinearLayoutManager.HorizontalScrollViewScrolledListener() {
|
||||||
commentMarkdownView.setSpoilerOnClick(false);
|
@Override
|
||||||
return;
|
public void onScrolledLeft() {
|
||||||
|
if (mActivity instanceof AccountSavedThingActivity) {
|
||||||
|
((AccountSavedThingActivity) mActivity).lockSwipeRightToGoBack();
|
||||||
|
} else {
|
||||||
|
((ViewUserDetailActivity) mActivity).lockSwipeRightToGoBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrolledRight() {
|
||||||
|
if (mActivity instanceof AccountSavedThingActivity) {
|
||||||
|
((AccountSavedThingActivity) mActivity).unlockSwipeRightToGoBack();
|
||||||
|
} else {
|
||||||
|
((ViewUserDetailActivity) mActivity).unlockSwipeRightToGoBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
commentMarkdownView.setLayoutManager(linearLayoutManager);
|
||||||
|
markwonAdapter = CustomMarkwonAdapter.builder(R.layout.adapter_default_entry, R.id.text)
|
||||||
|
.include(TableBlock.class, TableEntry.create(builder -> builder
|
||||||
|
.tableLayout(R.layout.adapter_table_block, R.id.table_layout)
|
||||||
|
.textLayoutIsRoot(R.layout.view_table_entry_cell)))
|
||||||
|
.build();
|
||||||
|
markwonAdapter.setOnClickListener(view -> {
|
||||||
|
if (view instanceof SpoilerOnClickTextView) {
|
||||||
|
if (((SpoilerOnClickTextView) view).isSpoilerOnClick()) {
|
||||||
|
((SpoilerOnClickTextView) view).setSpoilerOnClick(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
itemView.callOnClick();
|
itemView.callOnClick();
|
||||||
});
|
});
|
||||||
|
commentMarkdownView.setAdapter(markwonAdapter);
|
||||||
|
|
||||||
commentMarkdownView.setMovementMethod(BetterLinkMovementMethod.newInstance().setOnLinkLongClickListener((textView, url) -> {
|
|
||||||
if (mActivity != null && !mActivity.isDestroyed() && !mActivity.isFinishing()) {
|
|
||||||
UrlMenuBottomSheetFragment urlMenuBottomSheetFragment = new UrlMenuBottomSheetFragment();
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString(UrlMenuBottomSheetFragment.EXTRA_URL, url);
|
|
||||||
urlMenuBottomSheetFragment.setArguments(bundle);
|
|
||||||
urlMenuBottomSheetFragment.show(mActivity.getSupportFragmentManager(), urlMenuBottomSheetFragment.getTag());
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}));
|
|
||||||
upvoteButton.setOnClickListener(view -> {
|
upvoteButton.setOnClickListener(view -> {
|
||||||
if (mAccessToken == null) {
|
if (mAccessToken == null) {
|
||||||
Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show();
|
Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show();
|
||||||
|
@@ -35,7 +35,7 @@ public class SpoilerParserPlugin extends AbstractMarkwonPlugin {
|
|||||||
this.backgroundColor = backgroundColor;
|
this.backgroundColor = backgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SpoilerParserPlugin create(@NonNull int textColor, @NonNull int backgroundColor) {
|
public static SpoilerParserPlugin create(int textColor, int backgroundColor) {
|
||||||
return new SpoilerParserPlugin(textColor, backgroundColor);
|
return new SpoilerParserPlugin(textColor, backgroundColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user