From 4eef498d241bf395415dac6b1b49114101de94ad Mon Sep 17 00:00:00 2001 From: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com> Date: Fri, 11 Jun 2021 14:08:08 +0200 Subject: [PATCH] Only call addClickListenersOnTimestamps if relatedInfo is instance of StreamInfo --- .../newpipe/util/external_communication/TextLinkifier.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java b/app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java index f4b423e41..76da09609 100644 --- a/app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java +++ b/app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java @@ -15,6 +15,7 @@ import androidx.annotation.Nullable; import androidx.core.text.HtmlCompat; import org.schabi.newpipe.extractor.Info; +import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.util.NavigationHelper; import java.util.regex.Matcher; @@ -258,7 +259,10 @@ public final class TextLinkifier { // add click actions on plain text timestamps only for description of contents, // unneeded for meta-info or other TextViews if (relatedInfo != null) { - addClickListenersOnTimestamps(context, textBlockLinked, relatedInfo, disposables); + if (relatedInfo instanceof StreamInfo) { + addClickListenersOnTimestamps(context, textBlockLinked, relatedInfo, + disposables); + } addClickListenersOnHashtags(context, textBlockLinked, relatedInfo); }