refactor: Show SB buttons with other overlay buttons when the video has ended

This commit is contained in:
LisoUseInAIKyrios
2025-08-16 16:24:24 -04:00
parent 84f3c6f02d
commit bedabd3fa3
2 changed files with 4 additions and 5 deletions

View File

@@ -5,10 +5,10 @@ import android.view.View;
import androidx.annotation.Nullable;
import app.revanced.extension.shared.Logger;
import app.revanced.extension.youtube.patches.VideoInformation;
import app.revanced.extension.youtube.settings.Settings;
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
@SuppressWarnings("unused")
public class CreateSegmentButton {
@Nullable
private static PlayerControlButton instance;
@@ -51,7 +51,6 @@ public class CreateSegmentButton {
}
private static boolean shouldBeShown() {
return Settings.SB_ENABLED.get() && Settings.SB_CREATE_NEW_SEGMENT.get()
&& !VideoInformation.isAtEndOfVideo();
return Settings.SB_ENABLED.get() && Settings.SB_CREATE_NEW_SEGMENT.get();
}
}

View File

@@ -5,12 +5,12 @@ import android.view.View;
import androidx.annotation.Nullable;
import app.revanced.extension.shared.Logger;
import app.revanced.extension.youtube.patches.VideoInformation;
import app.revanced.extension.youtube.settings.Settings;
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
import app.revanced.extension.youtube.sponsorblock.SponsorBlockUtils;
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
@SuppressWarnings("unused")
public class VotingButton {
@Nullable
private static PlayerControlButton instance;
@@ -54,6 +54,6 @@ public class VotingButton {
private static boolean shouldBeShown() {
return Settings.SB_ENABLED.get() && Settings.SB_VOTING_BUTTON.get()
&& SegmentPlaybackController.videoHasSegments() && !VideoInformation.isAtEndOfVideo();
&& SegmentPlaybackController.videoHasSegments();
}
}