Skip to content

Commit bedabd3

Browse files
author
LisoUseInAIKyrios
committed
refactor: Show SB buttons with other overlay buttons when the video has ended
1 parent 84f3c6f commit bedabd3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/ui/CreateSegmentButton.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import androidx.annotation.Nullable;
66

77
import app.revanced.extension.shared.Logger;
8-
import app.revanced.extension.youtube.patches.VideoInformation;
98
import app.revanced.extension.youtube.settings.Settings;
109
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
1110

11+
@SuppressWarnings("unused")
1212
public class CreateSegmentButton {
1313
@Nullable
1414
private static PlayerControlButton instance;
@@ -51,7 +51,6 @@ public static void setVisibility(boolean visible, boolean animated) {
5151
}
5252

5353
private static boolean shouldBeShown() {
54-
return Settings.SB_ENABLED.get() && Settings.SB_CREATE_NEW_SEGMENT.get()
55-
&& !VideoInformation.isAtEndOfVideo();
54+
return Settings.SB_ENABLED.get() && Settings.SB_CREATE_NEW_SEGMENT.get();
5655
}
5756
}

extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/ui/VotingButton.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import androidx.annotation.Nullable;
66

77
import app.revanced.extension.shared.Logger;
8-
import app.revanced.extension.youtube.patches.VideoInformation;
98
import app.revanced.extension.youtube.settings.Settings;
109
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
1110
import app.revanced.extension.youtube.sponsorblock.SponsorBlockUtils;
1211
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
1312

13+
@SuppressWarnings("unused")
1414
public class VotingButton {
1515
@Nullable
1616
private static PlayerControlButton instance;
@@ -54,6 +54,6 @@ public static void setVisibility(boolean visible, boolean animated) {
5454

5555
private static boolean shouldBeShown() {
5656
return Settings.SB_ENABLED.get() && Settings.SB_VOTING_BUTTON.get()
57-
&& SegmentPlaybackController.videoHasSegments() && !VideoInformation.isAtEndOfVideo();
57+
&& SegmentPlaybackController.videoHasSegments();
5858
}
5959
}

0 commit comments

Comments
 (0)