mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 12:47:26 +01:00
Don't pick up hyperlink text as a link (#1182)
This commit is contained in:
parent
4bec3e0922
commit
3815abec36
@ -7,6 +7,7 @@ import android.content.SharedPreferences;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@ -243,6 +244,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
textView.setTypeface(mActivity.contentTypeface);
|
||||
}
|
||||
textView.setTextColor(markdownColor);
|
||||
textView.setHighlightColor(Color.TRANSPARENT);
|
||||
textView.setOnLongClickListener(view -> {
|
||||
if (textView.getSelectionStart() == -1 && textView.getSelectionEnd() == -1) {
|
||||
CopyTextBottomSheetFragment.show(
|
||||
|
@ -66,7 +66,8 @@ public class SpoilerAwareMovementMethod extends BetterLinkMovementMethod {
|
||||
private ClickableSpan selectClickableSpan(@NonNull Object[] spans) {
|
||||
SpoilerSpan spoilerSpan = null;
|
||||
ClickableSpan nonSpoilerSpan = null;
|
||||
for (final Object span : spans) {
|
||||
for (int i = spans.length - 1; i >= 0; i--) {
|
||||
final Object span = spans[i];
|
||||
if (span instanceof SpoilerSpan) {
|
||||
spoilerSpan = (SpoilerSpan) span;
|
||||
} else if (span instanceof ClickableSpan) {
|
||||
|
Loading…
Reference in New Issue
Block a user