mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Remove autoLink attribute which was causing warnings to show twice, and highlight links in comments before a blog is expanded
This commit is contained in:
@@ -171,9 +171,10 @@ class BlogPostViewHolder extends RecyclerView.ViewHolder {
|
||||
// TODO make author clickable #624
|
||||
|
||||
text.setText(c.getComment());
|
||||
Linkify.addLinks(text, Linkify.WEB_URLS);
|
||||
text.setMovementMethod(null);
|
||||
if (fullText) {
|
||||
text.setTextIsSelectable(true);
|
||||
Linkify.addLinks(text, Linkify.WEB_URLS);
|
||||
makeLinksClickable(text, listener::onLinkClick);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.briarproject.briar.android.conversation;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.util.Linkify;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -59,6 +60,7 @@ abstract class ConversationItemViewHolder extends ViewHolder {
|
||||
|
||||
if (item.getText() != null) {
|
||||
text.setText(trim(item.getText()));
|
||||
Linkify.addLinks(text, Linkify.WEB_URLS);
|
||||
makeLinksClickable(text, listener::onLinkClick);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.briar.android.conversation;
|
||||
|
||||
import android.text.util.Linkify;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -41,6 +42,7 @@ class ConversationNoticeViewHolder extends ConversationItemViewHolder {
|
||||
} else {
|
||||
msgText.setVisibility(VISIBLE);
|
||||
msgText.setText(trim(text));
|
||||
Linkify.addLinks(msgText, Linkify.WEB_URLS);
|
||||
makeLinksClickable(msgText, listener::onLinkClick);
|
||||
layout.setBackgroundResource(isIncoming() ?
|
||||
R.drawable.notice_in_bottom : R.drawable.notice_out_bottom);
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.animation.Animator;
|
||||
import android.animation.ArgbEvaluator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.text.util.Linkify;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
@@ -44,6 +45,7 @@ public abstract class BaseThreadItemViewHolder<I extends ThreadItem>
|
||||
@CallSuper
|
||||
public void bind(I item, ThreadItemListener<I> listener) {
|
||||
textView.setText(StringUtils.trim(item.getText()));
|
||||
Linkify.addLinks(textView, Linkify.WEB_URLS);
|
||||
makeLinksClickable(textView, listener::onLinkClick);
|
||||
|
||||
author.setAuthor(item.getAuthor(), item.getAuthorInfo());
|
||||
|
||||
Reference in New Issue
Block a user