-
-
Notifications
You must be signed in to change notification settings - Fork 239
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 - Swipe controls): Save and restore brightness and add auto-brightness toggle #610
Conversation
...n/java/app/revanced/integrations/youtube/swipecontrols/SwipeControlsConfigurationProvider.kt
Outdated
Show resolved
Hide resolved
...ed/integrations/youtube/swipecontrols/controller/gesture/core/VolumeAndBrightnessScroller.kt
Outdated
Show resolved
Hide resolved
...ava/app/revanced/integrations/youtube/swipecontrols/controller/ScreenBrightnessController.kt
Outdated
Show resolved
Hide resolved
...ain/java/app/revanced/integrations/youtube/swipecontrols/views/SwipeControlsOverlayLayout.kt
Outdated
Show resolved
Hide resolved
now tests are needed, probably everything is fixed. I didn't think it would be so difficult to do in such a simple code |
sorry Liso 🙂
*/ | ||
var savedScreenBrightnessValue: Float | ||
get() = Settings.SWIPE_BRIGHTNESS_VALUE.get() | ||
set(value) = Settings.SWIPE_BRIGHTNESS_VALUE.save(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, this can be simplified by adding get set operators and delegating getter setter properties, not a matter of this PR though.
app/src/main/java/app/revanced/integrations/youtube/swipecontrols/SwipeControlsHostActivity.kt
Outdated
Show resolved
Hide resolved
@LisoUseInAIKyrios Can you also check the code and fix something if necessary? You still have more experience in coding |
@MarcaDian I have never used the swipe controls, and I'm not familiar with how it works or should work 😕 |
Why was the PR closed? |
Hello. I can't overcome the fact that after soft close the brightness is reset to auto (-1f), but if after that force close and reopen app, then the brightness is saved and restored normally. I can't understand where this reset is, so I decided to close the PR. Perhaps the problem is in the firmware. I looked the implementation of this in Extended, but there it is on crutches. Every time when the player type is changed, If i find a fix i will reopen PR. |
If I patched without At the first i tested with 4 patches: |
This means the issue would occur for Premium users that have this feature turned on. |
Probably fixed |
# [1.8.0-dev.20](v1.8.0-dev.19...v1.8.0-dev.20) (2024-04-21) ### Features * **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([#610](#610)) ([1c8e2b2](1c8e2b2))
# [1.8.0](v1.7.0...v1.8.0) (2024-04-21) ### Bug Fixes * Use correct hide playables setting key ([a2b1543](a2b1543)) * **YouTube - Disable suggested video end screen:** Require app restart ([38ae5aa](38ae5aa)) * **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([#601](#601)) ([c5c9de5](c5c9de5)) * **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([#616](#616)) ([13dc172](13dc172)) * **YouTube - Hide keyword content:** Correctly hide content in the subscription tab ([c3bfa77](c3bfa77)) * **YouTube - Hide layout components:** Do not hide playlist shelf in library ([c5d38a7](c5d38a7)) * **YouTube - Hide layout components:** Hide horizontal tile shelves ([ba30869](ba30869)) * **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed ([#600](#600)) ([c420891](c420891)) * **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([#611](#611)) ([ffc3437](ffc3437)) * **YouTube - Hide Shorts components:** Do not show Shorts suggestions in video player, if all hide Shorts options are enabled ([#613](#613)) ([c132670](c132670)) * **YouTube - Hide Shorts components:** Hide paid promotion label ([3ce100c](3ce100c)) * **YouTube - Hide Shorts components:** Hide subscribe button in channel bar ([9938bbf](9938bbf)) * **YouTube - Hide Shorts components:** Hide suggested actions in incognito mode ([bba421d](bba421d)) * **YouTube - Navigation bar hook:** Handle if search is active but hidden behind a maximized player ([cbccb46](cbccb46)) * **YouTube - Player flyout menu:** Add hide Lock screen menu ([#609](#609)) ([b2fe105](b2fe105)) * **YouTube - Return YouTube Dislike:** Do not clip compact text when not using English ([eeaeb49](eeaeb49)) * **YouTube - Return YouTube Dislike:** Do not show error toast if API success response contains new lines ([#612](#612)) ([9108205](9108205)) * **YouTube - Settings:** Do not show a toast if migrating old unknown settings ([f2e15a2](f2e15a2)) * **YouTube - Spoof device dimensions:** Warn about potential performance issues ([#617](#617)) ([786ac9d](786ac9d)) ### Features * **YouTube - Hide layout components:** Add option to hide horizontal shelves ([#598](#598)) ([fedace0](fedace0)) * **YouTube - Hide layout components:** Hide playables ([d6cd550](d6cd550)) * **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([#614](#614)) ([acfa3c9](acfa3c9)) * **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([#615](#615)) ([0586fb7](0586fb7)) * **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([#610](#610)) ([1c8e2b2](1c8e2b2)) * **YouTube:** Add 'About' preference to settings menu ([#608](#608)) ([b8f260e](b8f260e))
# [1.8.0](v1.7.0...v1.8.0) (2024-04-21) ### Bug Fixes * Use correct hide playables setting key ([a2b1543](a2b1543)) * **YouTube - Disable suggested video end screen:** Require app restart ([38ae5aa](38ae5aa)) * **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([ReVanced#601](https://github.com/E85Addict/revanced-integrations/issues/601)) ([c5c9de5](c5c9de5)) * **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([ReVanced#616](https://github.com/E85Addict/revanced-integrations/issues/616)) ([13dc172](13dc172)) * **YouTube - Hide keyword content:** Correctly hide content in the subscription tab ([c3bfa77](c3bfa77)) * **YouTube - Hide layout components:** Do not hide playlist shelf in library ([c5d38a7](c5d38a7)) * **YouTube - Hide layout components:** Hide horizontal tile shelves ([ba30869](ba30869)) * **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed ([ReVanced#600](https://github.com/E85Addict/revanced-integrations/issues/600)) ([c420891](c420891)) * **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([ReVanced#611](https://github.com/E85Addict/revanced-integrations/issues/611)) ([ffc3437](ffc3437)) * **YouTube - Hide Shorts components:** Do not show Shorts suggestions in video player, if all hide Shorts options are enabled ([ReVanced#613](https://github.com/E85Addict/revanced-integrations/issues/613)) ([c132670](c132670)) * **YouTube - Hide Shorts components:** Hide paid promotion label ([3ce100c](3ce100c)) * **YouTube - Hide Shorts components:** Hide subscribe button in channel bar ([9938bbf](9938bbf)) * **YouTube - Hide Shorts components:** Hide suggested actions in incognito mode ([bba421d](bba421d)) * **YouTube - Navigation bar hook:** Handle if search is active but hidden behind a maximized player ([cbccb46](cbccb46)) * **YouTube - Player flyout menu:** Add hide Lock screen menu ([ReVanced#609](https://github.com/E85Addict/revanced-integrations/issues/609)) ([b2fe105](b2fe105)) * **YouTube - Return YouTube Dislike:** Do not clip compact text when not using English ([eeaeb49](eeaeb49)) * **YouTube - Return YouTube Dislike:** Do not show error toast if API success response contains new lines ([ReVanced#612](https://github.com/E85Addict/revanced-integrations/issues/612)) ([9108205](9108205)) * **YouTube - Settings:** Do not show a toast if migrating old unknown settings ([f2e15a2](f2e15a2)) * **YouTube - Spoof device dimensions:** Warn about potential performance issues ([ReVanced#617](https://github.com/E85Addict/revanced-integrations/issues/617)) ([786ac9d](786ac9d)) ### Features * **YouTube - Hide layout components:** Add option to hide horizontal shelves ([ReVanced#598](https://github.com/E85Addict/revanced-integrations/issues/598)) ([fedace0](fedace0)) * **YouTube - Hide layout components:** Hide playables ([d6cd550](d6cd550)) * **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([ReVanced#614](https://github.com/E85Addict/revanced-integrations/issues/614)) ([acfa3c9](acfa3c9)) * **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([ReVanced#615](https://github.com/E85Addict/revanced-integrations/issues/615)) ([0586fb7](0586fb7)) * **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([ReVanced#610](https://github.com/E85Addict/revanced-integrations/issues/610)) ([1c8e2b2](1c8e2b2)) * **YouTube:** Add 'About' preference to settings menu ([ReVanced#608](https://github.com/E85Addict/revanced-integrations/issues/608)) ([b8f260e](b8f260e)) ### Performance Improvements * Add upstream sync ([4ad5c0c](4ad5c0c))
integrations for ReVanced/revanced-patches#2996