mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-05 17:45:49 +01:00
fix more issues with buttons i don't even know anymore
This commit is contained in:
parent
234edac030
commit
bf6c9e7b28
@ -204,9 +204,6 @@ public class PlayerController {
|
||||
return;
|
||||
}
|
||||
|
||||
SponsorBlockUtils.showShieldButton(); // skipping from end to the video will show the buttons again
|
||||
SponsorBlockUtils.showVoteButton();
|
||||
|
||||
SponsorSegment[] segments = sponsorSegmentsOfCurrentVideo;
|
||||
if (segments == null || segments.length == 0) return;
|
||||
|
||||
@ -275,6 +272,10 @@ public class PlayerController {
|
||||
* Called very high frequency (once every about 100ms), also in background. It sometimes triggers when a video is paused (couple times in the row with the same value)
|
||||
*/
|
||||
public static void setCurrentVideoTimeHighPrecision(final long millis) {
|
||||
if ((millis < lastKnownVideoTime && lastKnownVideoTime >= currentVideoLength) || millis == 0) {
|
||||
SponsorBlockUtils.showShieldButton(); // skipping from end to the video will show the buttons again
|
||||
SponsorBlockUtils.showVoteButton();
|
||||
}
|
||||
if (lastKnownVideoTime > 0) {
|
||||
lastKnownVideoTime = millis;
|
||||
VideoInformation.lastKnownVideoTime = lastKnownVideoTime;
|
||||
|
@ -83,8 +83,8 @@ public class SponsorBlockSettings {
|
||||
if (!isSponsorBlockEnabled) {
|
||||
SkipSegmentView.hide();
|
||||
NewSegmentHelperLayout.hide();
|
||||
ShieldButton.changeVisibilityImmediate(false);
|
||||
VotingButton.changeVisibilityImmediate(false);
|
||||
SponsorBlockUtils.hideShieldButton();
|
||||
SponsorBlockUtils.hideVoteButton();
|
||||
PlayerController.sponsorSegmentsOfCurrentVideo = null;
|
||||
} else if (/*isAddNewSegmentEnabled*/false) {
|
||||
SponsorBlockUtils.showShieldButton();
|
||||
@ -93,13 +93,16 @@ public class SponsorBlockSettings {
|
||||
isAddNewSegmentEnabled = preferences.getBoolean(PREFERENCES_KEY_NEW_SEGMENT_ENABLED, isAddNewSegmentEnabled);
|
||||
if (!isAddNewSegmentEnabled) {
|
||||
NewSegmentHelperLayout.hide();
|
||||
ShieldButton.changeVisibilityImmediate(false);
|
||||
SponsorBlockUtils.hideShieldButton();
|
||||
} else {
|
||||
ShieldButton.changeVisibilityImmediate(true);
|
||||
SponsorBlockUtils.showShieldButton();
|
||||
}
|
||||
|
||||
isVotingEnabled = preferences.getBoolean(PREFERENCES_KEY_VOTING_ENABLED, isVotingEnabled);
|
||||
VotingButton.changeVisibilityImmediate(isVotingEnabled);
|
||||
if (!isVotingEnabled)
|
||||
SponsorBlockUtils.hideVoteButton();
|
||||
else
|
||||
SponsorBlockUtils.showVoteButton();
|
||||
|
||||
SegmentBehaviour[] possibleBehaviours = SegmentBehaviour.values();
|
||||
final ArrayList<String> enabledCategories = new ArrayList<>(possibleBehaviours.length);
|
||||
|
Loading…
Reference in New Issue
Block a user