-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(YouTube - Player flyout menu): Hide sleep timer #3637
feat(YouTube - Player flyout menu): Hide sleep timer #3637
Conversation
If you press |
If the user still 'awake' then press close to continue watching, or simply ignore it (sleep) then screen will go off by itself. |
@LisoUseInAIKyrios the tittle shouldn't changed, it's to unlock the timer, not to remove it, imo |
The PR title is the same as the patch name, and its similar to the This PR removes all restrictions for using the sleep timer, including the a/b account selection restriction since sleep timer is an experimental feature. |
This could use a new hide fly out setting, to hide the feature if the user doesn't want it. Looks like the buffer string |
...main/kotlin/app/revanced/patches/youtube/layout/buttons/player/flyout/SleepTimerMenuPatch.kt
Outdated
Show resolved
Hide resolved
...main/kotlin/app/revanced/patches/youtube/layout/buttons/player/flyout/SleepTimerMenuPatch.kt
Outdated
Show resolved
Hide resolved
@zainarbani For me, the sleep timer appears in two places in the flyout menu. Without this PR I already have it in the root flyout menu, and with this patch it shows a second time in the additional settings menu. There must be two different feature flags. Ideally this would set one flag as true and the other as false to prevent duplicates. |
feefb56
to
a371631
Compare
I just realized that this features was now enabled by default on stock |
In ReVanced when I switch to a non premium account after using my premium account, the sleep timer is present for non premium. But when I use the same account with un-patched YouTube the sleep timer is not present. Maybe it hasn't rolled out to my stock YouTube because I almost never open it. So maybe this isn't needed anymore. The hide fly out function can be kept, so can remove the feature flag patch and still use this PR. |
But I don't have this menu item either on the root page or in the flyout menu, I've never had a premium account, so it seems to me that this PR is still needed. |
@LisoUseInAIKyrios @MarcaDian I think duplicated menu is fixed now, can you confirm on your end? |
@zainarbani The duplicate flyout menu is fixed for me. The sleep timer does not appear to be a Premium exclusive feature, and it seems to be rolling out to all users. It's useful to enable the feature now, but a dedicated patch may soon be obsolete. Maybe the feature flag change can be rolled into |
I tested the last commit, but now I don't have this |
Or maybe there's two feature flags for different menu locations. Because the sleep timer works for me without this PR. |
I get this new sleep timer as default on revanced yt 19.34.42. Spoof streams turned off tho, and i'm not premium user. |
@MarcaDian Try clearing stock app data. Sometimes sleep timer menu are delayed or not showing on the root flyout menu (probably still calculating the video lengths), you need to re-open flyout menu. |
Off topic but it seems modern miniplayer & new cairo setting layout are now enabled by default on stock app. |
Now I got the flag too. New Cairo boot animation, cairo seekbar, modern miniplayer and Sleep Timer item has appeared without this PR. |
I assume its pretty safe to remove the feature flag patch now |
@oSumAtrIX @LisoUseInAIKyrios btw, is there a plan to enable the new cairo settings layout? just in case the old layout removed by youtube. |
Eventually, yeah. Allowing the Cairo settings breaks some patches (such as seekbar color, background playback), so it's more than just fixing the settings menu. |
Just a question, is it possible to make Cairo seekbar always in color? because usually it is gray when not clicked on the player. We can also add |
If you turn on custom seekbar color, then the seekbar is always that color and not white when in dark mode. But with custom color it's no longer Cairo gradient style. The downside to that patch is it's a patch time change and not runtime. The Cairo gradient color is now hooked in the code, and instead of overriding both start and end with the same custom color it could be possible to pick two colors in the setting. Edit: using two custom colors might look out of place since it would be a mix of single color and gradient in different places. Some places it draws a single color (such as dark mode where it's white), and the feature flag to disable the broken Cairo settings also changes the seekbar to solid color in a few places. Edit 2: Even with the Cairo settings enabled, the seekbar is not gradient everywhere. Allowing custom gradients may not be very useful, especially since the custom gradients chosen must visually make sense otherwise the gradient looks like a mess. |
4fa3ac7
to
c6738ce
Compare
c6738ce
to
08b71b4
Compare
Sleep timer is a new feature rolling out to all YouTube users.