1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 08:30:44 +00:00

Only call addClickListenersOnTimestamps if relatedInfo is instance of StreamInfo

This commit is contained in:
TiA4f8R 2021-06-11 14:08:08 +02:00
parent 32b0bdb98c
commit 4eef498d24
No known key found for this signature in database
GPG Key ID: E6D3E7F5949450DD

View File

@ -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);
}