From 5602a8f0eea9caeac1280b81babd11a293cb8593 Mon Sep 17 00:00:00 2001 From: polymorphicshade Date: Tue, 16 Feb 2021 18:52:03 -0700 Subject: [PATCH] some clean up --- .../main/java/org/schabi/newpipe/player/Player.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 204b52cbd..0f3d78f5e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -128,7 +128,6 @@ import org.schabi.newpipe.util.ShareUtils; import org.schabi.newpipe.util.SponsorBlockMode; import org.schabi.newpipe.util.VideoSegment; import org.schabi.newpipe.views.ExpandableSurfaceView; -import org.schabi.newpipe.views.MarkableSeekBar; import org.schabi.newpipe.views.SeekBarMarker; import java.io.IOException; @@ -4284,12 +4283,7 @@ public final class Player implements } private void markSegments() { - if (!(binding.playbackSeekBar instanceof MarkableSeekBar)) { - return; - } - - final MarkableSeekBar markableSeekBar = (MarkableSeekBar) binding.playbackSeekBar; - markableSeekBar.clearMarkers(); + binding.playbackSeekBar.clearMarkers(); final VideoSegment[] segments = getVideoSegments(); @@ -4308,9 +4302,10 @@ public final class Player implements final SeekBarMarker seekBarMarker = new SeekBarMarker(segment.startTime, segment.endTime, (int) simpleExoPlayer.getDuration(), color); - markableSeekBar.seekBarMarkers.add(seekBarMarker); + binding.playbackSeekBar.seekBarMarkers.add(seekBarMarker); } - markableSeekBar.drawMarkers(); + + binding.playbackSeekBar.drawMarkers(); } private Integer parseSegmentCategory(final String category) {