Only call addClickListenersOnTimestamps if relatedInfo is instance of StreamInfo
This commit is contained in:
parent
00dc669975
commit
90cf5011b2
1 changed files with 5 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ import androidx.annotation.Nullable;
|
||||||
import androidx.core.text.HtmlCompat;
|
import androidx.core.text.HtmlCompat;
|
||||||
|
|
||||||
import org.schabi.newpipe.extractor.Info;
|
import org.schabi.newpipe.extractor.Info;
|
||||||
|
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||||
import org.schabi.newpipe.util.NavigationHelper;
|
import org.schabi.newpipe.util.NavigationHelper;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
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,
|
// add click actions on plain text timestamps only for description of contents,
|
||||||
// unneeded for meta-info or other TextViews
|
// unneeded for meta-info or other TextViews
|
||||||
if (relatedInfo != null) {
|
if (relatedInfo != null) {
|
||||||
addClickListenersOnTimestamps(context, textBlockLinked, relatedInfo, disposables);
|
if (relatedInfo instanceof StreamInfo) {
|
||||||
|
addClickListenersOnTimestamps(context, textBlockLinked, relatedInfo,
|
||||||
|
disposables);
|
||||||
|
}
|
||||||
addClickListenersOnHashtags(context, textBlockLinked, relatedInfo);
|
addClickListenersOnHashtags(context, textBlockLinked, relatedInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue