Skip to content

Commit

Permalink
Only call addClickListenersOnTimestamps if relatedInfo is instance of…
Browse files Browse the repository at this point in the history
… StreamInfo
  • Loading branch information
AudricV committed Jun 11, 2021
1 parent 32b0bdb commit 4eef498
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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;
Expand Down Expand Up @@ -258,7 +259,10 @@ public void onClick(@NonNull final View view) {
// 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);
}

Expand Down

0 comments on commit 4eef498

Please sign in to comment.