Experiment: mark clicked links

pull/187/head
M66B 4 years ago
parent 986540b770
commit ab224f1103

@ -2811,7 +2811,7 @@ Reformatting and displaying such messages will take too long. You can try to use
<a name="faq125"></a>
**(125) What are the current experimental features?**
* ...
* Mark clicked links by changing the link color
<br />

@ -4114,9 +4114,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (url.equals(title))
title = null;
if (onOpenLink(uri, title))
if (onOpenLink(uri, title)) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(widget.getContext());
boolean experiments = prefs.getBoolean("experiments", false);
if (experiments) {
int colorPrimary = Helper.resolveColor(widget.getContext(), android.R.attr.textColorPrimary);
buffer.setSpan(new ForegroundColorSpan(colorPrimary), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
return true;
}
}
ImageSpan[] image = buffer.getSpans(off, off, ImageSpan.class);
if (image.length > 0) {

Loading…
Cancel
Save