Fix .onion link linkification.

Fixes #11458.
This commit is contained in:
Justin Tracey
2022-04-14 17:58:05 -04:00
committed by Greyson Parrelli
parent 6563ea970f
commit 8a2f89b4f6
8 changed files with 108 additions and 77 deletions

View File

@@ -19,7 +19,7 @@ import com.annimon.stream.Stream;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.components.emoji.EmojiTextView;
import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil;
import org.thoughtcrime.securesms.util.LinkUtil;
import org.thoughtcrime.securesms.util.LongClickCopySpan;
public final class GroupDescriptionUtil {
@@ -43,7 +43,7 @@ public final class GroupDescriptionUtil {
if (hasLinks) {
Stream.of(descriptionSpannable.getSpans(0, descriptionSpannable.length(), URLSpan.class))
.filterNot(url -> LinkPreviewUtil.isLegalUrl(url.getURL()))
.filterNot(url -> LinkUtil.isLegalUrl(url.getURL()))
.forEach(descriptionSpannable::removeSpan);
URLSpan[] urlSpans = descriptionSpannable.getSpans(0, descriptionSpannable.length(), URLSpan.class);