mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Switch to LinkifyCompat.
We've seen some inconsistencies across OEMs with Linkify. Hopefully LinkifyCompat will resolve them.
This commit is contained in:
@@ -13,6 +13,7 @@ import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.text.util.LinkifyCompat;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
@@ -38,7 +39,7 @@ public final class GroupDescriptionUtil {
|
||||
|
||||
if (linkify) {
|
||||
int linkPattern = Linkify.WEB_URLS | Linkify.EMAIL_ADDRESSES | Linkify.PHONE_NUMBERS;
|
||||
boolean hasLinks = Linkify.addLinks(descriptionSpannable, linkPattern);
|
||||
boolean hasLinks = LinkifyCompat.addLinks(descriptionSpannable, linkPattern);
|
||||
|
||||
if (hasLinks) {
|
||||
Stream.of(descriptionSpannable.getSpans(0, descriptionSpannable.length(), URLSpan.class))
|
||||
|
||||
Reference in New Issue
Block a user