generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(YouTube): Merge
Restore old seekbar thumbnails
into `Seekbar th…
…umbnails` (#3860) Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
- Loading branch information
1 parent
f98d0b5
commit 39b6c04
Showing
8 changed files
with
46 additions
and
85 deletions.
There are no files selected for viewing
10 changes: 0 additions & 10 deletions
10
...rc/main/java/app/revanced/extension/youtube/patches/RestoreOldSeekbarThumbnailsPatch.java
This file was deleted.
Oops, something went wrong.
18 changes: 17 additions & 1 deletion
18
...s/shared/src/main/java/app/revanced/extension/youtube/patches/SeekbarThumbnailsPatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
package app.revanced.extension.youtube.patches; | ||
|
||
import app.revanced.extension.shared.settings.Setting; | ||
import app.revanced.extension.youtube.settings.Settings; | ||
|
||
@SuppressWarnings("unused") | ||
public class SeekbarThumbnailsPatch { | ||
|
||
private static final boolean SEEKBAR_THUMBNAILS_HIGH_QUALITY_ENABLED = Settings.SEEKBAR_THUMBNAILS_HIGH_QUALITY.get(); | ||
public static final class SeekbarThumbnailsHighQualityAvailability implements Setting.Availability { | ||
@Override | ||
public boolean isAvailable() { | ||
return VersionCheckPatch.IS_19_17_OR_GREATER || !Settings.RESTORE_OLD_SEEKBAR_THUMBNAILS.get(); | ||
} | ||
} | ||
|
||
private static final boolean SEEKBAR_THUMBNAILS_HIGH_QUALITY_ENABLED | ||
= Settings.SEEKBAR_THUMBNAILS_HIGH_QUALITY.get(); | ||
|
||
/** | ||
* Injection point. | ||
*/ | ||
public static boolean useHighQualityFullscreenThumbnails() { | ||
return SEEKBAR_THUMBNAILS_HIGH_QUALITY_ENABLED; | ||
} | ||
|
||
/** | ||
* Injection point. | ||
*/ | ||
public static boolean useFullscreenSeekbarThumbnails() { | ||
return !Settings.RESTORE_OLD_SEEKBAR_THUMBNAILS.get(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 0 additions & 60 deletions
60
...in/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters