1
mirror of https://github.com/revanced/revanced-integrations synced 2025-11-19 03:23:27 +01:00

Compare commits

...

149 Commits

Author SHA1 Message Date
semantic-release-bot
7aec04647a chore(release): 1.11.1-dev.3 [skip ci]
## [1.11.1-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.11.1-dev.2...v1.11.1-dev.3) (2024-07-05)

### Bug Fixes

* **YouTube - Hide ads:** Hide new types of home feed button ads ([#662](https://github.com/ReVanced/revanced-integrations/issues/662)) ([ff2637c](ff2637cb4c))
* **YouTube - Settings:** Move some settings to different menus, adjust default setting values ([#661](https://github.com/ReVanced/revanced-integrations/issues/661)) ([77533cf](77533cf3d6))
2024-07-05 17:44:15 +00:00
LisoUseInAIKyrios
ff2637cb4c fix(YouTube - Hide ads): Hide new types of home feed button ads (#662) 2024-07-05 21:40:52 +04:00
LisoUseInAIKyrios
77533cf3d6 fix(YouTube - Settings): Move some settings to different menus, adjust default setting values (#661) 2024-07-05 21:38:33 +04:00
semantic-release-bot
d9f7679020 chore(release): 1.11.1-dev.2 [skip ci]
## [1.11.1-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.11.1-dev.1...v1.11.1-dev.2) (2024-06-30)

### Bug Fixes

* **YouTube - Hide layout components:** Hide new kind of community post ([#659](https://github.com/ReVanced/revanced-integrations/issues/659)) ([c237e3c](c237e3c02c))
2024-06-30 18:45:48 +00:00
Bceez
c237e3c02c fix(YouTube - Hide layout components): Hide new kind of community post (#659)
fix(YouTube - Hide layout components) Community posts not hiding
2024-06-30 20:42:52 +02:00
semantic-release-bot
3dda3de280 chore(release): 1.11.1-dev.1 [skip ci]
## [1.11.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0...v1.11.1-dev.1) (2024-06-23)

### Bug Fixes

* **YouTube - Hide layout components:** Detect if a keyword filter hides all videos ([#657](https://github.com/ReVanced/revanced-integrations/issues/657)) ([3a3ceec](3a3ceec4b5))
2024-06-23 12:50:16 +00:00
LisoUseInAIKyrios
3a3ceec4b5 fix(YouTube - Hide layout components): Detect if a keyword filter hides all videos (#657) 2024-06-23 15:46:42 +03:00
semantic-release-bot
8fe73b25d9 chore(release): 1.11.0 [skip ci]
# [1.11.0](https://github.com/ReVanced/revanced-integrations/compare/v1.10.0...v1.11.0) (2024-06-23)

### Bug Fixes

* **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([#652](https://github.com/ReVanced/revanced-integrations/issues/652)) ([58f8172](58f8172b2d))
* **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([#654](https://github.com/ReVanced/revanced-integrations/issues/654)) ([f82dfce](f82dfce887))
* **YouTube - Return YouTube Dislike:** Do not replace view count with dislikes ([5f79196](5f79196692))
* **YouTube - Spoof client:** Correctly play as background audio only with Android VR ([9adbc66](9adbc66197))
* **YouTube - Spoof client:** Correctly play some live streams when using Android VR ([f74fb17](f74fb17a12))
* **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([#651](https://github.com/ReVanced/revanced-integrations/issues/651)) ([84c50c0](84c50c080c))

### Features

* **Boost For Reddit:** Add `Fix /s/ links` patch ([#631](https://github.com/ReVanced/revanced-integrations/issues/631)) ([0c9ad35](0c9ad35fc9))
* **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([#656](https://github.com/ReVanced/revanced-integrations/issues/656)) ([064d8e9](064d8e99a9))
* **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([#653](https://github.com/ReVanced/revanced-integrations/issues/653)) ([240e805](240e805489))
* **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([#649](https://github.com/ReVanced/revanced-integrations/issues/649)) ([f483af6](f483af6d3a))
2024-06-23 12:15:11 +00:00
oSumAtrIX
fac49c7c10 chore: Merge branch dev to main (#650) 2024-06-23 14:11:58 +02:00
semantic-release-bot
e018746ceb chore(release): 1.11.0-dev.7 [skip ci]
# [1.11.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0-dev.6...v1.11.0-dev.7) (2024-06-17)

### Bug Fixes

* **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([#654](https://github.com/ReVanced/revanced-integrations/issues/654)) ([f82dfce](f82dfce887))
2024-06-17 22:57:01 +00:00
ILoveOpenSourceApplications
f82dfce887 fix(YouTube - Hide description components): Replace Hide game section and Hide music section with Hide attributes section (#654)
Co-authored-by: ILoveOpenSourceApplications <ILoveOpenSourceApplications@users.noreply.github.com>
2024-06-18 00:54:06 +02:00
semantic-release-bot
a1e358bc18 chore(release): 1.11.0-dev.6 [skip ci]
# [1.11.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0-dev.5...v1.11.0-dev.6) (2024-06-17)

### Features

* **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([#656](https://github.com/ReVanced/revanced-integrations/issues/656)) ([064d8e9](064d8e99a9))
2024-06-17 22:52:30 +00:00
ILoveOpenSourceApplications
064d8e99a9 feat(YouTube - Comments): Add Hide 'Create a Short' button option (#656)
Co-authored-by: ILoveOpenSourceApplications <ILoveOpenSourceApplications@users.noreply.github.com>
2024-06-18 00:49:14 +02:00
semantic-release-bot
84d2484ace chore(release): 1.11.0-dev.5 [skip ci]
# [1.11.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0-dev.4...v1.11.0-dev.5) (2024-06-09)

### Features

* **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([#653](https://github.com/ReVanced/revanced-integrations/issues/653)) ([240e805](240e805489))
2024-06-09 09:18:07 +00:00
ILoveOpenSourceApplications
240e805489 feat(YouTube - Comments): Add Hide Thanks button and Hide 'Comments by members' header options (#653) 2024-06-09 12:14:51 +03:00
semantic-release-bot
376eb46f10 chore(release): 1.11.0-dev.4 [skip ci]
# [1.11.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0-dev.3...v1.11.0-dev.4) (2024-06-09)

### Bug Fixes

* **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([#652](https://github.com/ReVanced/revanced-integrations/issues/652)) ([58f8172](58f8172b2d))
2024-06-09 08:34:37 +00:00
LisoUseInAIKyrios
58f8172b2d fix(YouTube - Client spoof): Correctly play more livestreams using Android VR (#652) 2024-06-09 11:31:30 +03:00
semantic-release-bot
758dfade7f chore(release): 1.11.0-dev.3 [skip ci]
# [1.11.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0-dev.2...v1.11.0-dev.3) (2024-06-08)

### Features

* **Boost For Reddit:** Add `Fix /s/ links` patch ([#631](https://github.com/ReVanced/revanced-integrations/issues/631)) ([0c9ad35](0c9ad35fc9))
2024-06-08 16:34:15 +00:00
Yan
0c9ad35fc9 feat(Boost For Reddit): Add Fix /s/ links patch (#631)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-06-08 18:31:13 +02:00
semantic-release-bot
5da0913d1d chore(release): 1.11.0-dev.2 [skip ci]
# [1.11.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.11.0-dev.1...v1.11.0-dev.2) (2024-06-08)

### Bug Fixes

* **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([#651](https://github.com/ReVanced/revanced-integrations/issues/651)) ([84c50c0](84c50c080c))
2024-06-08 08:37:59 +00:00
LisoUseInAIKyrios
84c50c080c fix(YouTube): Rename Minimized playback to Remove background playback restrictions (#651) 2024-06-08 11:34:57 +03:00
semantic-release-bot
925f8bb297 chore(release): 1.11.0-dev.1 [skip ci]
# [1.11.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.10.1-dev.3...v1.11.0-dev.1) (2024-06-07)

### Features

* **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([#649](https://github.com/ReVanced/revanced-integrations/issues/649)) ([f483af6](f483af6d3a))
2024-06-07 22:48:23 +00:00
LisoUseInAIKyrios
f483af6d3a feat(YouTube - Miniplayer): Rename Tablet mini player and allow selecting the style of the in-app miniplayer (#649) 2024-06-08 01:45:24 +03:00
semantic-release-bot
7a7b2db6f7 chore(release): 1.10.1-dev.3 [skip ci]
## [1.10.1-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.10.1-dev.2...v1.10.1-dev.3) (2024-06-07)

### Bug Fixes

* **YouTube - Spoof client:** Correctly play as background audio only with Android VR ([9adbc66](9adbc66197))
2024-06-07 14:06:57 +00:00
LisoUseInAIKyrios
9adbc66197 fix(YouTube - Spoof client): Correctly play as background audio only with Android VR 2024-06-07 17:03:34 +03:00
semantic-release-bot
7736ca4ef8 chore(release): 1.10.1-dev.2 [skip ci]
## [1.10.1-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.10.1-dev.1...v1.10.1-dev.2) (2024-06-06)

### Bug Fixes

* **YouTube - Return YouTube Dislike:** Do not replace view count with dislikes ([5f79196](5f79196692))
2024-06-06 09:42:56 +00:00
LisoUseInAIKyrios
5f79196692 fix(YouTube - Return YouTube Dislike): Do not replace view count with dislikes 2024-06-06 12:39:42 +03:00
semantic-release-bot
ecd687100c chore(release): 1.10.1-dev.1 [skip ci]
## [1.10.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.10.0...v1.10.1-dev.1) (2024-06-06)

### Bug Fixes

* **YouTube - Spoof client:** Correctly play some live streams when using Android VR ([f74fb17](f74fb17a12))
2024-06-06 09:26:10 +00:00
LisoUseInAIKyrios
f74fb17a12 fix(YouTube - Spoof client): Correctly play some live streams when using Android VR 2024-06-06 12:22:38 +03:00
semantic-release-bot
4f11b1d2eb chore(release): 1.10.0 [skip ci]
# [1.10.0](https://github.com/ReVanced/revanced-integrations/compare/v1.9.2...v1.10.0) (2024-06-02)

### Bug Fixes

* **YouTube - Spoof client:** Allow swipe gestures to enter/exit fullscreen when spoofing with `Android VR` client ([#645](https://github.com/ReVanced/revanced-integrations/issues/645)) ([b826865](b826865ef4))
* **YouTube - Spoof client:** Restore playback speed menu when spoofing to an iOS client ([2b2a70e](2b2a70e6ea))

### Features

* **YouTube - Hide layout components:** Disable like / subscribe button glow animation ([#646](https://github.com/ReVanced/revanced-integrations/issues/646)) ([777ffb1](777ffb1360))
* **YouTube - Playback speed:** Add option to show speed dialog button in video player ([#636](https://github.com/ReVanced/revanced-integrations/issues/636)) ([59220d6](59220d6e25))
* **YouTube:** Support version `19.12`, `19.13`, `19.14`, `19.15` and `19.16` ([#643](https://github.com/ReVanced/revanced-integrations/issues/643)) ([4dce73a](4dce73a6fb))
2024-06-02 17:45:16 +00:00
oSumAtrIX
5f0852c0c2 chore: Merge branch dev to main (#647) 2024-06-02 19:42:00 +02:00
semantic-release-bot
240e19966d chore(release): 1.10.0-dev.5 [skip ci]
# [1.10.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.10.0-dev.4...v1.10.0-dev.5) (2024-06-02)

### Features

* **YouTube - Playback speed:** Add option to show speed dialog button in video player ([#636](https://github.com/ReVanced/revanced-integrations/issues/636)) ([59220d6](59220d6e25))
2024-06-02 15:51:00 +00:00
MarcaD
59220d6e25 feat(YouTube - Playback speed): Add option to show speed dialog button in video player (#636)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-06-02 17:48:02 +02:00
semantic-release-bot
571ce75c84 chore(release): 1.10.0-dev.4 [skip ci]
# [1.10.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.10.0-dev.3...v1.10.0-dev.4) (2024-06-02)

### Bug Fixes

* **YouTube - Spoof client:** Restore playback speed menu when spoofing to an iOS client ([2b2a70e](2b2a70e6ea))
2024-06-02 15:46:59 +00:00
oSumAtrIX
2b2a70e6ea fix(YouTube - Spoof client): Restore playback speed menu when spoofing to an iOS client 2024-06-02 17:43:40 +02:00
semantic-release-bot
caa94fa6a4 chore(release): 1.10.0-dev.3 [skip ci]
# [1.10.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.10.0-dev.2...v1.10.0-dev.3) (2024-06-01)

### Features

* **YouTube:** Support version `19.12`, `19.13`, `19.14`, `19.15` and `19.16` ([#643](https://github.com/ReVanced/revanced-integrations/issues/643)) ([4dce73a](4dce73a6fb))
2024-06-01 18:12:48 +00:00
LisoUseInAIKyrios
4dce73a6fb feat(YouTube): Support version 19.12, 19.13, 19.14, 19.15 and 19.16 (#643) 2024-06-01 22:09:36 +04:00
semantic-release-bot
a7e9390479 chore(release): 1.10.0-dev.2 [skip ci]
# [1.10.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.10.0-dev.1...v1.10.0-dev.2) (2024-06-01)

### Bug Fixes

* **YouTube - Spoof client:** Allow swipe gestures to enter/exit fullscreen when spoofing with `Android VR` client ([#645](https://github.com/ReVanced/revanced-integrations/issues/645)) ([b826865](b826865ef4))
2024-06-01 09:32:09 +00:00
KAZI MMT
b826865ef4 fix(YouTube - Spoof client): Allow swipe gestures to enter/exit fullscreen when spoofing with Android VR client (#645) 2024-06-01 13:29:14 +04:00
semantic-release-bot
b1109350fa chore(release): 1.10.0-dev.1 [skip ci]
# [1.10.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.9.2...v1.10.0-dev.1) (2024-05-31)

### Features

* **YouTube - Hide layout components:** Disable like / subscribe button glow animation ([#646](https://github.com/ReVanced/revanced-integrations/issues/646)) ([777ffb1](777ffb1360))
2024-05-31 21:01:12 +00:00
LisoUseInAIKyrios
777ffb1360 feat(YouTube - Hide layout components): Disable like / subscribe button glow animation (#646) 2024-06-01 00:57:47 +04:00
semantic-release-bot
3fe0f3fa06 chore(release): 1.9.2 [skip ci]
## [1.9.2](https://github.com/ReVanced/revanced-integrations/compare/v1.9.1...v1.9.2) (2024-05-31)

### Bug Fixes

* **YouTube - Restore old video quality menu:** Do not show error toast if using an old version of YT ([#640](https://github.com/ReVanced/revanced-integrations/issues/640)) ([2227b45](2227b45020))
* **YouTube - Spoof client:** Disable AV1 if not supported by spoofing an older iOS device ([#644](https://github.com/ReVanced/revanced-integrations/issues/644)) ([e28edba](e28edbadbf))
* **YouTube - Spoof client:** Improve Android spoofing ([#641](https://github.com/ReVanced/revanced-integrations/issues/641)) ([baf967e](baf967e12a))
2024-05-31 10:07:33 +00:00
oSumAtrIX
60ae48bdbf chore: Merge branch dev to main (#642) 2024-05-31 12:04:12 +02:00
LisoUseInAIKyrios
1f36aae81b chore: Sanitize spoof logs 2024-05-29 00:48:04 +04:00
semantic-release-bot
3a978ecc92 chore(release): 1.9.2-dev.3 [skip ci]
## [1.9.2-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.9.2-dev.2...v1.9.2-dev.3) (2024-05-28)

### Bug Fixes

* **YouTube - Spoof client:** Disable AV1 if not supported by spoofing an older iOS device ([#644](https://github.com/ReVanced/revanced-integrations/issues/644)) ([e28edba](e28edbadbf))
2024-05-28 19:42:25 +00:00
LisoUseInAIKyrios
e28edbadbf fix(YouTube - Spoof client): Disable AV1 if not supported by spoofing an older iOS device (#644) 2024-05-28 23:38:57 +04:00
semantic-release-bot
b2eac9099f chore(release): 1.9.2-dev.2 [skip ci]
## [1.9.2-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.9.2-dev.1...v1.9.2-dev.2) (2024-05-27)

### Bug Fixes

* **YouTube - Restore old video quality menu:** Do not show error toast if using an old version of YT ([#640](https://github.com/ReVanced/revanced-integrations/issues/640)) ([2227b45](2227b45020))
2024-05-27 14:15:23 +00:00
LisoUseInAIKyrios
2227b45020 fix(YouTube - Restore old video quality menu): Do not show error toast if using an old version of YT (#640) 2024-05-27 18:12:05 +04:00
LisoUseInAIKyrios
22ed627a5d build: fix gradle 2024-05-27 18:11:33 +04:00
oSumAtrIX
2ac29c2579 build: Bump dependencies 2024-05-26 01:21:12 +02:00
oSumAtrIX
0e7bf05a0e docs: Improve issue templates 2024-05-26 00:43:36 +02:00
semantic-release-bot
97e531d795 chore(release): 1.9.2-dev.1 [skip ci]
## [1.9.2-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.9.1...v1.9.2-dev.1) (2024-05-25)

### Bug Fixes

* **YouTube - Spoof client:** Improve Android spoofing ([#641](https://github.com/ReVanced/revanced-integrations/issues/641)) ([baf967e](baf967e12a))
2024-05-25 22:13:13 +00:00
LisoUseInAIKyrios
baf967e12a fix(YouTube - Spoof client): Improve Android spoofing (#641) 2024-05-26 02:10:09 +04:00
semantic-release-bot
702df1a93d chore(release): 1.9.1 [skip ci]
## [1.9.1](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0...v1.9.1) (2024-05-24)

### Bug Fixes

* **YouTube - Client spoof:** Spoof iOS client model to fix various side effects ([#638](https://github.com/ReVanced/revanced-integrations/issues/638)) ([fcff9a2](fcff9a2049))
2024-05-24 00:34:27 +00:00
oSumAtrIX
8a70ffe9c0 chore: Merge branch dev to main (#639) 2024-05-24 02:31:34 +02:00
semantic-release-bot
d2e74aca3d chore(release): 1.9.1-dev.1 [skip ci]
## [1.9.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0...v1.9.1-dev.1) (2024-05-23)

### Bug Fixes

* **YouTube - Client spoof:** Spoof iOS client model to fix various side effects ([#638](https://github.com/ReVanced/revanced-integrations/issues/638)) ([fcff9a2](fcff9a2049))
2024-05-23 20:45:14 +00:00
oSumAtrIX
fcff9a2049 fix(YouTube - Client spoof): Spoof iOS client model to fix various side effects (#638)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2024-05-23 22:42:15 +02:00
semantic-release-bot
1b82e985b6 chore(release): 1.9.0 [skip ci]
# [1.9.0](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0...v1.9.0) (2024-05-21)

### Bug Fixes

* Use Java instead of Kotlin Regex to improve reliability ([#628](https://github.com/ReVanced/revanced-integrations/issues/628)) ([44c3cc4](44c3cc4636))
* **YouTube - Client spoof:** Spoof client to fix playback ([#637](https://github.com/ReVanced/revanced-integrations/issues/637)) ([4c1f82a](4c1f82aa22))
* **YouTube - Hide keyword content:** Filter Shorts found in horizontal shelves ([75fa579](75fa5797f7))
* **YouTube - Hide Shorts components:** Hide old layout like/dislike buttons without leaving empty space ([9782338](978233843d))
* **YouTube - Hide Shorts components:** Hide Shorts in search result horizontal shelves ([#625](https://github.com/ReVanced/revanced-integrations/issues/625)) ([656ca17](656ca17ffc))
* **YouTube - Hide video action buttons:** Remove obsolete `hide Shop button` ([#618](https://github.com/ReVanced/revanced-integrations/issues/618)) ([a78c3ff](a78c3ff09e))
* **YouTube - Hide video action buttons:** Updated path filter ([b74e544](b74e54481a))
* **YouTube - Player flyout menu:** Remove obsolete `Hide report menu` ([9e9d969](9e9d96910c))
* **YouTube - Restore old video quality menu:** Do not make click sounds when opening Shorts quality menu ([578a27d](578a27dea5))
* **YouTube - Restore old video quality menu:** Show advanced quality menu in Shorts quality flyout ([#632](https://github.com/ReVanced/revanced-integrations/issues/632)) ([77c9825](77c9825b82))
* **YouTube - Settings:** Use same background color for about screen if Theme patch is not included ([4164ed3](4164ed3486))
* **YouTube - SponsorBlock:** Show correct segment times if video is over 24 hours in length ([#630](https://github.com/ReVanced/revanced-integrations/issues/630)) ([81251f9](81251f9a34))

### Features

* **YouTube - Comments:** Add option to hide timestamp and emoji buttons ([#621](https://github.com/ReVanced/revanced-integrations/issues/621)) ([6e9e122](6e9e12235a))
* **YouTube - Hide ads:** Add option to hide the 'Visit store' button on channel pages ([#622](https://github.com/ReVanced/revanced-integrations/issues/622)) ([9de566c](9de566ca02))
* **YouTube - Hide Shorts components:** Hide 'Buy super thanks' button ([#633](https://github.com/ReVanced/revanced-integrations/issues/633)) ([303754c](303754c46f))
* **YouTube - Hide Shorts components:** Hide like / dislike button in video ads ([#619](https://github.com/ReVanced/revanced-integrations/issues/619)) ([b2b6b8c](b2b6b8c3d7))
* **YouTube - Navigation buttons:** Add option to hide navigation button labels ([#635](https://github.com/ReVanced/revanced-integrations/issues/635)) ([6bd0ac2](6bd0ac20dc))
2024-05-21 00:48:39 +00:00
oSumAtrIX
9147842ac7 chore: Merge branch dev to main (#620) 2024-05-21 02:45:35 +02:00
semantic-release-bot
e3994d381b chore(release): 1.9.0-dev.15 [skip ci]
# [1.9.0-dev.15](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.14...v1.9.0-dev.15) (2024-05-21)

### Bug Fixes

* **YouTube - Client spoof:** Spoof client to fix playback ([#637](https://github.com/ReVanced/revanced-integrations/issues/637)) ([4c1f82a](4c1f82aa22))
2024-05-21 00:44:41 +00:00
oSumAtrIX
4c1f82aa22 fix(YouTube - Client spoof): Spoof client to fix playback (#637)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2024-05-21 02:41:34 +02:00
semantic-release-bot
ea184d050e chore(release): 1.9.0-dev.14 [skip ci]
# [1.9.0-dev.14](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.13...v1.9.0-dev.14) (2024-05-18)

### Features

* **YouTube - Navigation buttons:** Add option to hide navigation button labels ([#635](https://github.com/ReVanced/revanced-integrations/issues/635)) ([6bd0ac2](6bd0ac20dc))
2024-05-18 21:18:05 +00:00
MarcaD
6bd0ac20dc feat(YouTube - Navigation buttons): Add option to hide navigation button labels (#635)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-05-19 01:15:14 +04:00
semantic-release-bot
78cf116e58 chore(release): 1.9.0-dev.13 [skip ci]
# [1.9.0-dev.13](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.12...v1.9.0-dev.13) (2024-05-16)

### Features

* **YouTube - Hide Shorts components:** Hide 'Buy super thanks' button ([#633](https://github.com/ReVanced/revanced-integrations/issues/633)) ([303754c](303754c46f))
2024-05-16 17:12:27 +00:00
LisoUseInAIKyrios
303754c46f feat(YouTube - Hide Shorts components): Hide 'Buy super thanks' button (#633) 2024-05-16 21:09:02 +04:00
semantic-release-bot
195a521238 chore(release): 1.9.0-dev.12 [skip ci]
# [1.9.0-dev.12](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.11...v1.9.0-dev.12) (2024-05-15)

### Bug Fixes

* **YouTube - Hide Shorts components:** Hide old layout like/dislike buttons without leaving empty space ([9782338](978233843d))
* **YouTube - Restore old video quality menu:** Do not make click sounds when opening Shorts quality menu ([578a27d](578a27dea5))
2024-05-15 18:22:49 +00:00
LisoUseInAIKyrios
978233843d fix(YouTube - Hide Shorts components): Hide old layout like/dislike buttons without leaving empty space
Also change hide by 1dp to 0dp, and consolidate two methods together
2024-05-15 22:19:22 +04:00
LisoUseInAIKyrios
578a27dea5 fix(YouTube - Restore old video quality menu): Do not make click sounds when opening Shorts quality menu 2024-05-15 22:19:22 +04:00
semantic-release-bot
6710acd928 chore(release): 1.9.0-dev.11 [skip ci]
# [1.9.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.10...v1.9.0-dev.11) (2024-05-15)

### Bug Fixes

* **YouTube - Hide video action buttons:** Updated path filter ([b74e544](b74e54481a))
2024-05-15 16:25:21 +00:00
LisoUseInAIKyrios
b74e54481a fix(YouTube - Hide video action buttons): Updated path filter 2024-05-15 20:21:46 +04:00
semantic-release-bot
a14567df27 chore(release): 1.9.0-dev.10 [skip ci]
# [1.9.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.9...v1.9.0-dev.10) (2024-05-11)

### Bug Fixes

* **YouTube - Restore old video quality menu:** Show advanced quality menu in Shorts quality flyout ([#632](https://github.com/ReVanced/revanced-integrations/issues/632)) ([77c9825](77c9825b82))
2024-05-11 20:33:16 +00:00
LisoUseInAIKyrios
77c9825b82 fix(YouTube - Restore old video quality menu): Show advanced quality menu in Shorts quality flyout (#632) 2024-05-12 00:30:10 +04:00
semantic-release-bot
44dea1af4e chore(release): 1.9.0-dev.9 [skip ci]
# [1.9.0-dev.9](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.8...v1.9.0-dev.9) (2024-05-08)

### Bug Fixes

* **YouTube - SponsorBlock:** Show correct segment times if video is over 24 hours in length ([#630](https://github.com/ReVanced/revanced-integrations/issues/630)) ([81251f9](81251f9a34))
2024-05-08 22:30:31 +00:00
LisoUseInAIKyrios
81251f9a34 fix(YouTube - SponsorBlock): Show correct segment times if video is over 24 hours in length (#630) 2024-05-09 02:27:07 +04:00
semantic-release-bot
7d102e7a69 chore(release): 1.9.0-dev.8 [skip ci]
# [1.9.0-dev.8](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.7...v1.9.0-dev.8) (2024-05-06)

### Bug Fixes

* **YouTube - Player flyout menu:** Remove obsolete `Hide report menu` ([9e9d969](9e9d96910c))
2024-05-06 20:51:16 +00:00
LisoUseInAIKyrios
9e9d96910c fix(YouTube - Player flyout menu): Remove obsolete Hide report menu 2024-05-07 00:48:12 +04:00
semantic-release-bot
a7ea203fad chore(release): 1.9.0-dev.7 [skip ci]
# [1.9.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.6...v1.9.0-dev.7) (2024-05-02)

### Bug Fixes

* Use Java instead of Kotlin Regex to improve reliability ([#628](https://github.com/ReVanced/revanced-integrations/issues/628)) ([44c3cc4](44c3cc4636))
2024-05-02 19:58:35 +00:00
benjy3gg
44c3cc4636 fix: Use Java instead of Kotlin Regex to improve reliability (#628)
If Kotlin Regex would be used, then apps need to have the Kotlin libraries for Regex to work which isn't always the case.
2024-05-02 21:55:28 +02:00
semantic-release-bot
07fe660037 chore(release): 1.9.0-dev.6 [skip ci]
# [1.9.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.5...v1.9.0-dev.6) (2024-04-29)

### Bug Fixes

* **YouTube - Hide keyword content:** Filter Shorts found in horizontal shelves ([75fa579](75fa5797f7))
2024-04-29 19:32:37 +00:00
LisoUseInAIKyrios
75fa5797f7 fix(YouTube - Hide keyword content): Filter Shorts found in horizontal shelves 2024-04-29 23:29:36 +04:00
semantic-release-bot
0d5c6e87d2 chore(release): 1.9.0-dev.5 [skip ci]
# [1.9.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.4...v1.9.0-dev.5) (2024-04-28)

### Bug Fixes

* **YouTube - Hide Shorts components:** Hide Shorts in search result horizontal shelves ([#625](https://github.com/ReVanced/revanced-integrations/issues/625)) ([656ca17](656ca17ffc))
2024-04-28 18:02:59 +00:00
LisoUseInAIKyrios
656ca17ffc fix(YouTube - Hide Shorts components): Hide Shorts in search result horizontal shelves (#625) 2024-04-28 21:59:22 +04:00
semantic-release-bot
973e51ea1b chore(release): 1.9.0-dev.4 [skip ci]
# [1.9.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.3...v1.9.0-dev.4) (2024-04-23)

### Bug Fixes

* **YouTube - Settings:** Use same background color for about screen if Theme patch is not included ([4164ed3](4164ed3486))
2024-04-23 21:08:02 +00:00
LisoUseInAIKyrios
4164ed3486 fix(YouTube - Settings): Use same background color for about screen if Theme patch is not included 2024-04-24 01:04:51 +04:00
semantic-release-bot
5ed4292e2e chore(release): 1.9.0-dev.3 [skip ci]
# [1.9.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.2...v1.9.0-dev.3) (2024-04-23)

### Features

* **YouTube - Hide ads:** Add option to hide the 'Visit store' button on channel pages ([#622](https://github.com/ReVanced/revanced-integrations/issues/622)) ([9de566c](9de566ca02))
2024-04-23 17:34:30 +00:00
oSumAtrIX
9de566ca02 feat(YouTube - Hide ads): Add option to hide the 'Visit store' button on channel pages (#622) 2024-04-23 19:31:27 +02:00
semantic-release-bot
a9da29926a chore(release): 1.9.0-dev.2 [skip ci]
# [1.9.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.9.0-dev.1...v1.9.0-dev.2) (2024-04-23)

### Features

* **YouTube - Comments:** Add option to hide timestamp and emoji buttons ([#621](https://github.com/ReVanced/revanced-integrations/issues/621)) ([6e9e122](6e9e12235a))
2024-04-23 17:06:41 +00:00
LisoUseInAIKyrios
6e9e12235a feat(YouTube - Comments): Add option to hide timestamp and emoji buttons (#621) 2024-04-23 21:03:00 +04:00
oSumAtrIX
e86d73c8af chore: Bump dependencies 2024-04-23 18:47:12 +02:00
semantic-release-bot
89c534e95d chore(release): 1.9.0-dev.1 [skip ci]
# [1.9.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0...v1.9.0-dev.1) (2024-04-21)

### Bug Fixes

* **YouTube - Hide video action buttons:** Remove obsolete `hide Shop button` ([#618](https://github.com/ReVanced/revanced-integrations/issues/618)) ([a78c3ff](a78c3ff09e))

### Features

* **YouTube - Hide Shorts components:** Hide like / dislike button in video ads ([#619](https://github.com/ReVanced/revanced-integrations/issues/619)) ([b2b6b8c](b2b6b8c3d7))
2024-04-21 15:00:33 +00:00
LisoUseInAIKyrios
a78c3ff09e fix(YouTube - Hide video action buttons): Remove obsolete hide Shop button (#618) 2024-04-21 18:57:22 +04:00
LisoUseInAIKyrios
b2b6b8c3d7 feat(YouTube - Hide Shorts components): Hide like / dislike button in video ads (#619) 2024-04-21 18:55:19 +04:00
semantic-release-bot
4e64b690ab chore(release): 1.8.0 [skip ci]
# [1.8.0](https://github.com/ReVanced/revanced-integrations/compare/v1.7.0...v1.8.0) (2024-04-21)

### Bug Fixes

* Use correct hide playables setting key ([a2b1543](a2b15433cf))
* **YouTube - Disable suggested video end screen:** Require app restart ([38ae5aa](38ae5aac84))
* **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([#601](https://github.com/ReVanced/revanced-integrations/issues/601)) ([c5c9de5](c5c9de500d))
* **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([#616](https://github.com/ReVanced/revanced-integrations/issues/616)) ([13dc172](13dc17288d))
* **YouTube - Hide keyword content:** Correctly hide content in the subscription tab ([c3bfa77](c3bfa77d62))
* **YouTube - Hide layout components:** Do not hide playlist shelf in library ([c5d38a7](c5d38a7e07))
* **YouTube - Hide layout components:** Hide horizontal tile shelves ([ba30869](ba308690cf))
* **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed  ([#600](https://github.com/ReVanced/revanced-integrations/issues/600)) ([c420891](c420891e3e))
* **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([#611](https://github.com/ReVanced/revanced-integrations/issues/611)) ([ffc3437](ffc3437843))
* **YouTube - Hide Shorts components:** Do not show Shorts suggestions in video player, if all hide Shorts options are enabled ([#613](https://github.com/ReVanced/revanced-integrations/issues/613)) ([c132670](c132670400))
* **YouTube - Hide Shorts components:** Hide paid promotion label ([3ce100c](3ce100ced5))
* **YouTube - Hide Shorts components:** Hide subscribe button in channel bar ([9938bbf](9938bbf0de))
* **YouTube - Hide Shorts components:** Hide suggested actions in incognito mode ([bba421d](bba421ddb6))
* **YouTube - Navigation bar hook:** Handle if search is active but hidden behind a maximized player ([cbccb46](cbccb46e63))
* **YouTube - Player flyout menu:** Add hide Lock screen menu ([#609](https://github.com/ReVanced/revanced-integrations/issues/609)) ([b2fe105](b2fe105199))
* **YouTube - Return YouTube Dislike:** Do not clip compact text when not using English ([eeaeb49](eeaeb49f2a))
* **YouTube - Return YouTube Dislike:** Do not show error toast if API success response contains new lines ([#612](https://github.com/ReVanced/revanced-integrations/issues/612)) ([9108205](9108205445))
* **YouTube - Settings:** Do not show a toast if migrating old unknown settings ([f2e15a2](f2e15a2e1f))
* **YouTube - Spoof device dimensions:** Warn about potential performance issues ([#617](https://github.com/ReVanced/revanced-integrations/issues/617)) ([786ac9d](786ac9d2b7))

### Features

* **YouTube - Hide layout components:** Add option to hide horizontal shelves ([#598](https://github.com/ReVanced/revanced-integrations/issues/598)) ([fedace0](fedace02fd))
* **YouTube - Hide layout components:** Hide playables ([d6cd550](d6cd550880))
* **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([#614](https://github.com/ReVanced/revanced-integrations/issues/614)) ([acfa3c9](acfa3c9886))
* **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([#615](https://github.com/ReVanced/revanced-integrations/issues/615)) ([0586fb7](0586fb70e3))
* **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([#610](https://github.com/ReVanced/revanced-integrations/issues/610)) ([1c8e2b2](1c8e2b2941))
* **YouTube:** Add 'About' preference to settings menu ([#608](https://github.com/ReVanced/revanced-integrations/issues/608)) ([b8f260e](b8f260ebd3))
2024-04-21 01:50:25 +00:00
oSumAtrIX
d03edb2750 chore: Merge branch dev to main (#603) 2024-04-21 03:47:15 +02:00
semantic-release-bot
d06b94cbe6 chore(release): 1.8.0-dev.20 [skip ci]
# [1.8.0-dev.20](https://github.com/ReVanced/revanced-integrations/compare/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](https://github.com/ReVanced/revanced-integrations/issues/610)) ([1c8e2b2](1c8e2b2941))
2024-04-21 00:02:28 +00:00
MarcaD
1c8e2b2941 feat(YouTube - Swipe controls): Save and restore brightness and add auto-brightness toggle (#610)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-04-21 01:59:23 +02:00
semantic-release-bot
efd03012d0 chore(release): 1.8.0-dev.19 [skip ci]
# [1.8.0-dev.19](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.18...v1.8.0-dev.19) (2024-04-18)

### Bug Fixes

* **YouTube - Hide keyword content:** Correctly hide content in the subscription tab ([c3bfa77](c3bfa77d62))
2024-04-18 18:43:48 +00:00
LisoUseInAIKyrios
c3bfa77d62 fix(YouTube - Hide keyword content): Correctly hide content in the subscription tab 2024-04-18 22:40:26 +04:00
semantic-release-bot
3ff5dcd05f chore(release): 1.8.0-dev.18 [skip ci]
# [1.8.0-dev.18](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.17...v1.8.0-dev.18) (2024-04-18)

### Bug Fixes

* **YouTube - Spoof device dimensions:** Warn about potential performance issues ([#617](https://github.com/ReVanced/revanced-integrations/issues/617)) ([786ac9d](786ac9d2b7))
2024-04-18 13:21:46 +00:00
LisoUseInAIKyrios
786ac9d2b7 fix(YouTube - Spoof device dimensions): Warn about potential performance issues (#617) 2024-04-18 17:18:52 +04:00
semantic-release-bot
bcc9126107 chore(release): 1.8.0-dev.17 [skip ci]
# [1.8.0-dev.17](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.16...v1.8.0-dev.17) (2024-04-18)

### Bug Fixes

* **YouTube - Hide Shorts components:** Hide paid promotion label ([3ce100c](3ce100ced5))
2024-04-18 11:00:38 +00:00
LisoUseInAIKyrios
3ce100ced5 fix(YouTube - Hide Shorts components): Hide paid promotion label 2024-04-18 14:57:17 +04:00
semantic-release-bot
4cacbf6f2c chore(release): 1.8.0-dev.16 [skip ci]
# [1.8.0-dev.16](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.15...v1.8.0-dev.16) (2024-04-18)

### Bug Fixes

* **YouTube - Hide layout components:** Hide horizontal tile shelves ([ba30869](ba308690cf))
2024-04-18 08:39:17 +00:00
LisoUseInAIKyrios
ba308690cf fix(YouTube - Hide layout components): Hide horizontal tile shelves 2024-04-18 12:35:58 +04:00
semantic-release-bot
7cd0c6c3c1 chore(release): 1.8.0-dev.15 [skip ci]
# [1.8.0-dev.15](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.14...v1.8.0-dev.15) (2024-04-17)

### Features

* **YouTube:** Add 'About' preference to settings menu ([#608](https://github.com/ReVanced/revanced-integrations/issues/608)) ([b8f260e](b8f260ebd3))
2024-04-17 16:04:27 +00:00
LisoUseInAIKyrios
b8f260ebd3 feat(YouTube): Add 'About' preference to settings menu (#608)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-04-17 20:00:52 +04:00
semantic-release-bot
f5720f71a6 chore(release): 1.8.0-dev.14 [skip ci]
# [1.8.0-dev.14](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.13...v1.8.0-dev.14) (2024-04-17)

### Bug Fixes

* **YouTube - Hide Shorts components:** Hide subscribe button in channel bar ([9938bbf](9938bbf0de))
2024-04-17 10:04:02 +00:00
LisoUseInAIKyrios
9938bbf0de fix(YouTube - Hide Shorts components): Hide subscribe button in channel bar 2024-04-17 14:00:35 +04:00
semantic-release-bot
d60dcf98ab chore(release): 1.8.0-dev.13 [skip ci]
# [1.8.0-dev.13](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.12...v1.8.0-dev.13) (2024-04-16)

### Bug Fixes

* **YouTube - Hide Shorts components:** Hide suggested actions in incognito mode ([bba421d](bba421ddb6))
2024-04-16 02:46:53 +00:00
LisoUseInAIKyrios
bba421ddb6 fix(YouTube - Hide Shorts components): Hide suggested actions in incognito mode 2024-04-16 06:43:40 +04:00
semantic-release-bot
8e36a018f4 chore(release): 1.8.0-dev.12 [skip ci]
# [1.8.0-dev.12](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.11...v1.8.0-dev.12) (2024-04-15)

### Bug Fixes

* **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([#616](https://github.com/ReVanced/revanced-integrations/issues/616)) ([13dc172](13dc17288d))
2024-04-15 15:21:42 +00:00
LisoUseInAIKyrios
13dc17288d fix(YouTube - Hide ads): rename Hide paid content to Hide paid promotion label (#616) 2024-04-15 19:18:48 +04:00
semantic-release-bot
92c591735a chore(release): 1.8.0-dev.11 [skip ci]
# [1.8.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.10...v1.8.0-dev.11) (2024-04-14)

### Bug Fixes

* **YouTube - Return YouTube Dislike:** Do not show error toast if API success response contains new lines ([#612](https://github.com/ReVanced/revanced-integrations/issues/612)) ([9108205](9108205445))
2024-04-14 19:40:10 +00:00
LisoUseInAIKyrios
9108205445 fix(YouTube - Return YouTube Dislike): Do not show error toast if API success response contains new lines (#612) 2024-04-14 23:37:17 +04:00
semantic-release-bot
e9cd898651 chore(release): 1.8.0-dev.10 [skip ci]
# [1.8.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.9...v1.8.0-dev.10) (2024-04-14)

### Features

* **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([#615](https://github.com/ReVanced/revanced-integrations/issues/615)) ([0586fb7](0586fb70e3))
2024-04-14 14:57:08 +00:00
LisoUseInAIKyrios
0586fb70e3 feat(YouTube - Hide Shorts components): Hide tagged products, hide search suggestions (#615) 2024-04-14 18:53:48 +04:00
semantic-release-bot
79a3a44961 chore(release): 1.8.0-dev.9 [skip ci]
# [1.8.0-dev.9](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.8...v1.8.0-dev.9) (2024-04-14)

### Bug Fixes

* Use correct hide playables setting key ([a2b1543](a2b15433cf))
2024-04-14 09:33:39 +00:00
LisoUseInAIKyrios
a2b15433cf fix: Use correct hide playables setting key 2024-04-14 13:30:41 +04:00
semantic-release-bot
96f42b3892 chore(release): 1.8.0-dev.8 [skip ci]
# [1.8.0-dev.8](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.7...v1.8.0-dev.8) (2024-04-14)

### Features

* **YouTube - Hide layout components:** Hide playables ([d6cd550](d6cd550880))
2024-04-14 00:10:19 +00:00
oSumAtrIX
d6cd550880 feat(YouTube - Hide layout components): Hide playables 2024-04-14 02:06:41 +02:00
semantic-release-bot
5b4fd770de chore(release): 1.8.0-dev.7 [skip ci]
# [1.8.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.6...v1.8.0-dev.7) (2024-04-12)

### Features

* **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([#614](https://github.com/ReVanced/revanced-integrations/issues/614)) ([acfa3c9](acfa3c9886))
2024-04-12 19:46:41 +00:00
LisoUseInAIKyrios
acfa3c9886 feat(YouTube - Hide Shorts components): Hide Shop, Location and Save sound to playlist buttons (#614) 2024-04-12 23:43:51 +04:00
semantic-release-bot
4bd805e54d chore(release): 1.8.0-dev.6 [skip ci]
# [1.8.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.5...v1.8.0-dev.6) (2024-04-12)

### Bug Fixes

* **YouTube - Hide Shorts components:** Do not show Shorts suggestions in video player, if all hide Shorts options are enabled ([#613](https://github.com/ReVanced/revanced-integrations/issues/613)) ([c132670](c132670400))
2024-04-12 16:59:13 +00:00
LisoUseInAIKyrios
c132670400 fix(YouTube - Hide Shorts components): Do not show Shorts suggestions in video player, if all hide Shorts options are enabled (#613) 2024-04-12 20:55:57 +04:00
semantic-release-bot
4fd3cc906d chore(release): 1.8.0-dev.5 [skip ci]
# [1.8.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.4...v1.8.0-dev.5) (2024-04-10)

### Bug Fixes

* **YouTube - Return YouTube Dislike:** Do not clip compact text when not using English ([eeaeb49](eeaeb49f2a))
2024-04-10 14:33:37 +00:00
LisoUseInAIKyrios
eeaeb49f2a fix(YouTube - Return YouTube Dislike): Do not clip compact text when not using English 2024-04-10 18:29:20 +04:00
semantic-release-bot
dba707800e chore(release): 1.8.0-dev.4 [skip ci]
# [1.8.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.3...v1.8.0-dev.4) (2024-04-10)

### Bug Fixes

* **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([#611](https://github.com/ReVanced/revanced-integrations/issues/611)) ([ffc3437](ffc3437843))
2024-04-10 08:32:23 +00:00
LisoUseInAIKyrios
ffc3437843 fix(YouTube - Hide Shorts components): Correctly hide Shorts if navigation tab is changed using device back button (#611) 2024-04-10 12:29:23 +04:00
semantic-release-bot
4939a22da1 chore(release): 1.8.0-dev.3 [skip ci]
# [1.8.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.2...v1.8.0-dev.3) (2024-04-09)

### Bug Fixes

* **YouTube - Settings:** Do not show a toast if migrating old unknown settings ([f2e15a2](f2e15a2e1f))
2024-04-09 21:02:25 +00:00
LisoUseInAIKyrios
f2e15a2e1f fix(YouTube - Settings): Do not show a toast if migrating old unknown settings 2024-04-10 00:59:23 +04:00
LisoUseInAIKyrios
eba73c5947 chore(YouTube): Fix typos, simplify some strings for translating 2024-04-07 23:55:33 +04:00
semantic-release-bot
c0764e9046 chore(release): 1.8.0-dev.2 [skip ci]
# [1.8.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.1...v1.8.0-dev.2) (2024-04-07)

### Bug Fixes

* **YouTube - Hide layout components:** Do not hide playlist shelf in library ([c5d38a7](c5d38a7e07))
2024-04-07 16:17:56 +00:00
LisoUseInAIKyrios
c5d38a7e07 fix(YouTube - Hide layout components): Do not hide playlist shelf in library 2024-04-07 20:14:29 +04:00
LisoUseInAIKyrios
f6de32884e chore: Add check in missing from merge 2024-04-06 22:49:49 +04:00
semantic-release-bot
628c25e808 chore(release): 1.8.0-dev.1 [skip ci]
# [1.8.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.7.1-dev.4...v1.8.0-dev.1) (2024-04-06)

### Bug Fixes

* **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([#601](https://github.com/ReVanced/revanced-integrations/issues/601)) ([c5c9de5](c5c9de500d))

### Features

* **YouTube - Hide layout components:** Add option to hide horizontal shelves ([#598](https://github.com/ReVanced/revanced-integrations/issues/598)) ([fedace0](fedace02fd))
2024-04-06 18:48:59 +00:00
LisoUseInAIKyrios
c5c9de500d fix(YouTube - GmsCore support): Prompt to disable battery optimizations, if not done already (#601)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-04-06 20:46:07 +02:00
nullptr
fedace02fd feat(YouTube - Hide layout components): Add option to hide horizontal shelves (#598)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2024-04-06 22:41:50 +04:00
semantic-release-bot
bddcc97392 chore(release): 1.7.1-dev.4 [skip ci]
## [1.7.1-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.7.1-dev.3...v1.7.1-dev.4) (2024-04-04)

### Bug Fixes

* **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed  ([#600](https://github.com/ReVanced/revanced-integrations/issues/600)) ([c420891](c420891e3e))
2024-04-04 21:12:44 +00:00
nullptr
c420891e3e fix(YouTube - Hide load more button): Include patch with Hide layout components, and hide button only in search feed (#600) 2024-04-05 01:09:42 +04:00
semantic-release-bot
33da670984 chore(release): 1.7.1-dev.3 [skip ci]
## [1.7.1-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.7.1-dev.2...v1.7.1-dev.3) (2024-04-04)

### Bug Fixes

* **YouTube - Player flyout menu:** Add hide Lock screen menu ([#609](https://github.com/ReVanced/revanced-integrations/issues/609)) ([b2fe105](b2fe105199))
2024-04-04 06:49:49 +00:00
LisoUseInAIKyrios
b2fe105199 fix(YouTube - Player flyout menu): Add hide Lock screen menu (#609) 2024-04-04 10:46:54 +04:00
semantic-release-bot
20162f977b chore(release): 1.7.1-dev.2 [skip ci]
## [1.7.1-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.7.1-dev.1...v1.7.1-dev.2) (2024-04-03)

### Bug Fixes

* **YouTube - Navigation bar hook:** Handle if search is active but hidden behind a maximized player ([cbccb46](cbccb46e63))
2024-04-03 20:25:32 +00:00
LisoUseInAIKyrios
cbccb46e63 fix(YouTube - Navigation bar hook): Handle if search is active but hidden behind a maximized player 2024-04-04 00:21:51 +04:00
semantic-release-bot
eaa2e1139c chore(release): 1.7.1-dev.1 [skip ci]
## [1.7.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.7.0...v1.7.1-dev.1) (2024-04-01)

### Bug Fixes

* **YouTube - Disable suggested video end screen:** Require app restart ([38ae5aa](38ae5aac84))
2024-04-01 13:14:01 +00:00
LisoUseInAIKyrios
38ae5aac84 fix(YouTube - Disable suggested video end screen): Require app restart 2024-04-01 17:11:07 +04:00
semantic-release-bot
530ba18364 chore(release): 1.7.0 [skip ci]
# [1.7.0](https://github.com/ReVanced/revanced-integrations/compare/v1.6.0...v1.7.0) (2024-03-30)

### Features

* **YouTube - Alternative thumbnails:** Selectively enable for home / subscription / search ([#593](https://github.com/ReVanced/revanced-integrations/issues/593)) ([4c81e96](4c81e96a74))
* **YouTube - GmsCore:** Require ignoring battery optimizations ([#599](https://github.com/ReVanced/revanced-integrations/issues/599)) ([fd2a9d0](fd2a9d0287))
2024-03-30 19:43:31 +00:00
oSumAtrIX
6c6c636a43 chore: Merge branch dev to main (#597) 2024-03-30 20:40:26 +01:00
semantic-release-bot
22e2163753 chore(release): 1.7.0-dev.2 [skip ci]
# [1.7.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.7.0-dev.1...v1.7.0-dev.2) (2024-03-30)

### Features

* **YouTube - GmsCore:** Require ignoring battery optimizations ([#599](https://github.com/ReVanced/revanced-integrations/issues/599)) ([fd2a9d0](fd2a9d0287))
2024-03-30 18:55:12 +00:00
oSumAtrIX
fd2a9d0287 feat(YouTube - GmsCore): Require ignoring battery optimizations (#599) 2024-03-30 19:52:10 +01:00
80 changed files with 5866 additions and 1947 deletions

View File

@@ -70,7 +70,7 @@ body:
Before creating a new bug report, please keep the following in mind:
- **Do not submit a duplicate bug report**: You can review existing bug reports [here](https://github.com/ReVanced/revanced-integrations/labels/Bug%20report).
- **Do not submit a duplicate bug report**: Search for existing bug reports [here](https://github.com/ReVanced/revanced-integrations/issues?q=label%3A%22Bug+report%22).
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
- type: textarea
attributes:
@@ -101,7 +101,7 @@ body:
label: Acknowledgements
description: Your bug report will be closed if you don't follow the checklist below.
options:
- label: This issue is not a duplicate of an existing bug report.
- label: I have checked all open and closed bug reports and this is not a duplicate.
required: true
- label: I have chosen an appropriate title.
required: true

View File

@@ -70,7 +70,7 @@ body:
Before creating a new feature request, please keep the following in mind:
- **Do not submit a duplicate feature request**: You can review existing feature requests [here](https://github.com/ReVanced/revanced-integrations/labels/Feature%20request).
- **Do not submit a duplicate feature request**: Search for existing feature requests [here](https://github.com/ReVanced/revanced-integrations/issues?q=label%3A%22Feature+request%22).
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
- type: textarea
attributes:
@@ -97,7 +97,7 @@ body:
label: Acknowledgements
description: Your feature request will be closed if you don't follow the checklist below.
options:
- label: This issue is not a duplicate of an existing feature request.
- label: I have checked all open and closed feature requests and this is not a duplicate.
required: true
- label: I have chosen an appropriate title.
required: true

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
package app.revanced.integrations.boostforreddit;
import com.rubenmayayo.reddit.ui.activities.WebViewActivity;
import app.revanced.integrations.shared.fixes.slink.BaseFixSLinksPatch;
/** @noinspection unused*/
public class FixSLinksPatch extends BaseFixSLinksPatch {
static {
INSTANCE = new FixSLinksPatch();
}
private FixSLinksPatch() {
webViewActivityClass = WebViewActivity.class;
}
public static boolean patchResolveSLink(String link) {
return INSTANCE.resolveSLink(link);
}
public static void patchSetAccessToken(String accessToken) {
INSTANCE.setAccessToken(accessToken);
}
}

View File

@@ -1,32 +1,37 @@
package app.revanced.integrations.shared;
import static app.revanced.integrations.shared.StringRef.str;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.PowerManager;
import android.provider.Settings;
import androidx.annotation.RequiresApi;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Objects;
import static app.revanced.integrations.shared.StringRef.str;
/**
* @noinspection unused
*/
public class GmsCoreSupport {
private static final String GMS_CORE_PACKAGE_NAME
= getGmsCoreVendor() + ".android.gms";
= getGmsCoreVendorGroupId() + ".android.gms";
private static final Uri GMS_CORE_PROVIDER
= Uri.parse("content://" + getGmsCoreVendorGroupId() + ".android.gsf.gservices/prefix");
private static final String DONT_KILL_MY_APP_LINK
= "https://dontkillmyapp.com";
private static final Uri GMS_CORE_PROVIDER
= Uri.parse("content://" + getGmsCoreVendor() + ".android.gsf.gservices/prefix");
private static void open(String queryOrLink, String message) {
Utils.showToastLong(message);
private static void open(String queryOrLink) {
Intent intent;
try {
// Check if queryOrLink is a valid URL.
@@ -40,48 +45,101 @@ public class GmsCoreSupport {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Utils.getContext().startActivity(intent);
// Gracefully exit, otherwise without Gms the app crashes and Android can nag the user.
// Gracefully exit, otherwise the broken app will continue to run.
System.exit(0);
}
private static void showBatteryOptimizationDialog(Activity context,
String dialogMessageRef,
String positiveButtonStringRef,
DialogInterface.OnClickListener onPositiveClickListener) {
// Use a delay to allow the activity to finish initializing.
// Otherwise, if device is in dark mode the dialog is shown with wrong color scheme.
Utils.runOnMainThreadDelayed(() -> {
new AlertDialog.Builder(context)
.setIconAttribute(android.R.attr.alertDialogIcon)
.setTitle(str("gms_core_dialog_title"))
.setMessage(str(dialogMessageRef))
.setPositiveButton(str(positiveButtonStringRef), onPositiveClickListener)
// Allow using back button to skip the action, just in case the check can never be satisfied.
.setCancelable(true)
.show();
}, 100);
}
/**
* Injection point.
*/
@RequiresApi(api = Build.VERSION_CODES.N)
public static void checkAvailability() {
var context = Objects.requireNonNull(Utils.getContext());
public static void checkGmsCore(Activity context) {
try {
context.getPackageManager().getPackageInfo(GMS_CORE_PACKAGE_NAME, PackageManager.GET_ACTIVITIES);
} catch (PackageManager.NameNotFoundException exception) {
Logger.printInfo(() -> "GmsCore was not found", exception);
open(getGmsCoreDownload(), str("gms_core_not_installed_warning"));
return;
}
// Verify GmsCore is installed.
try {
PackageManager manager = context.getPackageManager();
manager.getPackageInfo(GMS_CORE_PACKAGE_NAME, PackageManager.GET_ACTIVITIES);
} catch (PackageManager.NameNotFoundException exception) {
Logger.printInfo(() -> "GmsCore was not found");
// Cannot show a dialog and must show a toast,
// because on some installations the app crashes before a dialog can be displayed.
Utils.showToastLong(str("gms_core_toast_not_installed_message"));
open(getGmsCoreDownload());
return;
}
try (var client = context.getContentResolver().acquireContentProviderClient(GMS_CORE_PROVIDER)) {
if (client != null) return;
// Check if GmsCore is running in the background.
try (var client = context.getContentResolver().acquireContentProviderClient(GMS_CORE_PROVIDER)) {
if (client == null) {
Logger.printInfo(() -> "GmsCore is not running in the background");
Logger.printInfo(() -> "GmsCore is not running in the background");
open(DONT_KILL_MY_APP_LINK, str("gms_core_not_running_warning"));
showBatteryOptimizationDialog(context,
"gms_core_dialog_not_whitelisted_not_allowed_in_background_message",
"gms_core_dialog_open_website_text",
(dialog, id) -> open(DONT_KILL_MY_APP_LINK));
return;
}
}
// Check if GmsCore is whitelisted from battery optimizations.
if (batteryOptimizationsEnabled(context)) {
Logger.printInfo(() -> "GmsCore is not whitelisted from battery optimizations");
showBatteryOptimizationDialog(context,
"gms_core_dialog_not_whitelisted_using_battery_optimizations_message",
"gms_core_dialog_continue_text",
(dialog, id) -> openGmsCoreDisableBatteryOptimizationsIntent(context));
}
} catch (Exception ex) {
Logger.printException(() -> "Could not check GmsCore background task", ex);
Logger.printException(() -> "checkGmsCore failure", ex);
}
}
@SuppressLint("BatteryLife") // Permission is part of GmsCore
private static void openGmsCoreDisableBatteryOptimizationsIntent(Activity activity) {
Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
intent.setData(Uri.fromParts("package", GMS_CORE_PACKAGE_NAME, null));
activity.startActivityForResult(intent, 0);
}
/**
* @return If GmsCore is not whitelisted from battery optimizations.
*/
private static boolean batteryOptimizationsEnabled(Context context) {
var powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
return !powerManager.isIgnoringBatteryOptimizations(GMS_CORE_PACKAGE_NAME);
}
private static String getGmsCoreDownload() {
final var vendor = getGmsCoreVendor();
final var vendorGroupId = getGmsCoreVendorGroupId();
//noinspection SwitchStatementWithTooFewBranches
switch (vendor) {
switch (vendorGroupId) {
case "app.revanced":
return "https://github.com/revanced/gmscore/releases/latest";
default:
return vendor + ".android.gms";
return vendorGroupId + ".android.gms";
}
}
// Modified by a patch. Do not touch.
private static String getGmsCoreVendor() {
private static String getGmsCoreVendorGroupId() {
return "app.revanced";
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,208 @@
package app.revanced.integrations.shared.fixes.slink;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import androidx.annotation.NonNull;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.util.Objects;
import static app.revanced.integrations.shared.Utils.getContext;
/**
* Base class to implement /s/ link resolution in 3rd party Reddit apps.
* <br>
* <br>
* Usage:
* <br>
* <br>
* An implementation of this class must have two static methods that are called by the app:
* <ul>
* <li>public static boolean patchResolveSLink(String link)</li>
* <li>public static void patchSetAccessToken(String accessToken)</li>
* </ul>
* The static methods must call the instance methods of the base class.
* <br>
* The singleton pattern can be used to access the instance of the class:
* <pre>
* {@code
* {
* INSTANCE = new FixSLinksPatch();
* }
* }
* </pre>
* Set the app's web view activity class as a fallback to open /s/ links if the resolution fails:
* <pre>
* {@code
* private FixSLinksPatch() {
* webViewActivityClass = WebViewActivity.class;
* }
* }
* </pre>
* Hook the app's navigation handler to call this method before doing any of its own resolution:
* <pre>
* {@code
* public static boolean patchResolveSLink(Context context, String link) {
* return INSTANCE.resolveSLink(context, link);
* }
* }
* </pre>
* If this method returns true, the app should early return and not do any of its own resolution.
* <br>
* <br>
* Hook the app's access token so that this class can use it to resolve /s/ links:
* <pre>
* {@code
* public static void patchSetAccessToken(String accessToken) {
* INSTANCE.setAccessToken(access_token);
* }
* }
* </pre>
*/
public abstract class BaseFixSLinksPatch {
/**
* The class of the activity used to open links in a web view if resolving them fails.
*/
protected Class<? extends Activity> webViewActivityClass;
/**
* The access token used to resolve the /s/ link.
*/
protected String accessToken;
/**
* The URL that was trying to be resolved before the access token was set.
* If this is not null, the URL will be resolved right after the access token is set.
*/
protected String pendingUrl;
/**
* The singleton instance of the class.
*/
protected static BaseFixSLinksPatch INSTANCE;
public boolean resolveSLink(String link) {
switch (resolveLink(link)) {
case ACCESS_TOKEN_START: {
pendingUrl = link;
return true;
}
case DO_NOTHING:
return true;
default:
return false;
}
}
private ResolveResult resolveLink(String link) {
Context context = getContext();
if (link.matches(".*reddit\\.com/r/[^/]+/s/[^/]+")) {
// A link ends with #bypass if it failed to resolve below.
// resolveLink is called with the same link again but this time with #bypass
// so that the link is opened in the app browser instead of trying to resolve it again.
if (link.endsWith("#bypass")) {
openInAppBrowser(context, link);
return ResolveResult.DO_NOTHING;
}
Logger.printDebug(() -> "Resolving " + link);
if (accessToken == null) {
// This is not optimal.
// However, an accessToken is necessary to make an authenticated request to Reddit.
// in case Reddit has banned the IP - e.g. VPN.
Intent startIntent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
context.startActivity(startIntent);
return ResolveResult.ACCESS_TOKEN_START;
}
Utils.runOnBackgroundThread(() -> {
String bypassLink = link + "#bypass";
String finalLocation = bypassLink;
try {
HttpURLConnection connection = getHttpURLConnection(link, accessToken);
connection.connect();
String location = connection.getHeaderField("location");
connection.disconnect();
Objects.requireNonNull(location, "Location is null");
finalLocation = location;
Logger.printDebug(() -> "Resolved " + link + " to " + location);
} catch (SocketTimeoutException e) {
Logger.printException(() -> "Timeout when trying to resolve " + link, e);
finalLocation = bypassLink;
} catch (Exception e) {
Logger.printException(() -> "Failed to resolve " + link, e);
finalLocation = bypassLink;
} finally {
Intent startIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(finalLocation));
startIntent.setPackage(context.getPackageName());
startIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(startIntent);
}
});
return ResolveResult.DO_NOTHING;
}
return ResolveResult.CONTINUE;
}
public void setAccessToken(String accessToken) {
Logger.printDebug(() -> "Setting access token");
this.accessToken = accessToken;
// In case a link was trying to be resolved before access token was set.
// The link is resolved now, after the access token is set.
if (pendingUrl != null) {
String link = pendingUrl;
pendingUrl = null;
Logger.printDebug(() -> "Opening pending URL");
resolveLink(link);
}
}
private void openInAppBrowser(Context context, String link) {
Intent intent = new Intent(context, webViewActivityClass);
intent.putExtra("url", link);
context.startActivity(intent);
}
@NonNull
private HttpURLConnection getHttpURLConnection(String link, String accessToken) throws IOException {
URL url = new URL(link);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setInstanceFollowRedirects(false);
connection.setRequestMethod("HEAD");
connection.setConnectTimeout(2000);
connection.setReadTimeout(2000);
if (accessToken != null) {
Logger.printDebug(() -> "Setting access token to make /s/ request");
connection.setRequestProperty("Authorization", "Bearer " + accessToken);
} else {
Logger.printDebug(() -> "Not setting access token to make /s/ request, because it is null");
}
return connection;
}
}

View File

@@ -0,0 +1,10 @@
package app.revanced.integrations.shared.fixes.slink;
public enum ResolveResult {
// Let app handle rest of stuff
CONTINUE,
// Start app, to make it cache its access_token
ACCESS_TOKEN_START,
// Don't do anything - we started resolving
DO_NOTHING
}

View File

@@ -2,13 +2,15 @@ package app.revanced.integrations.shared.settings;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.Logger;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Locale;
import java.util.Objects;
import app.revanced.integrations.shared.Logger;
/**
* If an Enum value is removed or changed, any saved or imported data using the
* non-existent value will be reverted to the default value
@@ -17,7 +19,7 @@ import java.util.Objects;
* All saved JSON text is converted to lowercase to keep the output less obnoxious.
*/
@SuppressWarnings("unused")
public class EnumSetting<T extends Enum> extends Setting<T> {
public class EnumSetting<T extends Enum<?>> extends Setting<T> {
public EnumSetting(String key, T defaultValue) {
super(key, defaultValue);
}
@@ -72,7 +74,7 @@ public class EnumSetting<T extends Enum> extends Setting<T> {
@NonNull
private T getEnumFromString(String enumName) {
//noinspection ConstantConditions
for (Enum value : defaultValue.getClass().getEnumConstants()) {
for (Enum<?> value : defaultValue.getClass().getEnumConstants()) {
if (value.name().equalsIgnoreCase(enumName)) {
// noinspection unchecked
return (T) value;
@@ -98,4 +100,18 @@ public class EnumSetting<T extends Enum> extends Setting<T> {
public T get() {
return value;
}
/**
* Availability based on if this setting is currently set to any of the provided types.
*/
@SafeVarargs
public final Setting.Availability availability(@NonNull T... types) {
return () -> {
T currentEnumType = get();
for (T enumType : types) {
if (currentEnumType == enumType) return true;
}
return false;
};
}
}

View File

@@ -224,6 +224,7 @@ public abstract class Setting<T> {
if (!oldPrefs.preferences.contains(settingKey)) {
return; // Nothing to do.
}
Object newValue = setting.get();
final Object migratedValue;
if (setting instanceof BooleanSetting) {
@@ -238,13 +239,17 @@ public abstract class Setting<T> {
migratedValue = oldPrefs.getString(settingKey, (String) newValue);
} else {
Logger.printException(() -> "Unknown setting: " + setting);
// Remove otherwise it'll show a toast on every launch
oldPrefs.preferences.edit().remove(settingKey).apply();
return;
}
oldPrefs.preferences.edit().remove(settingKey).apply(); // Remove the old setting.
if (migratedValue.equals(newValue)) {
Logger.printDebug(() -> "Value does not need migrating: " + settingKey);
return; // Old value is already equal to the new setting value.
}
Logger.printDebug(() -> "Migrating old preference value into current preference: " + settingKey);
//noinspection unchecked
setting.save(migratedValue);

View File

@@ -16,10 +16,7 @@ import app.revanced.integrations.shared.settings.Setting;
import static app.revanced.integrations.shared.StringRef.str;
/**
*
*
* @noinspection deprecation, DataFlowIssue , unused */
@SuppressWarnings({"unused", "deprecation"})
public abstract class AbstractPreferenceFragment extends PreferenceFragment {
/**
* Indicates that if a preference changes,

View File

@@ -15,7 +15,7 @@ import app.revanced.integrations.shared.Utils;
import static app.revanced.integrations.shared.StringRef.str;
/** @noinspection deprecation, unused */
@SuppressWarnings({"unused", "deprecation"})
public class ImportExportPreference extends EditTextPreference implements Preference.OnPreferenceClickListener {
private String existingSettings;

View File

@@ -14,7 +14,7 @@ import java.util.Objects;
import static app.revanced.integrations.shared.StringRef.str;
@SuppressWarnings("unused")
@SuppressWarnings({"unused", "deprecation"})
public class ResettableEditTextPreference extends EditTextPreference {
public ResettableEditTextPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
@@ -33,7 +33,7 @@ public class ResettableEditTextPreference extends EditTextPreference {
@Override
protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
super.onPrepareDialogBuilder(builder);
Setting setting = Setting.getSettingFromPath(getKey());
Setting<?> setting = Setting.getSettingFromPath(getKey());
if (setting != null) {
builder.setNeutralButton(str("revanced_settings_reset"), null);
}
@@ -50,7 +50,7 @@ public class ResettableEditTextPreference extends EditTextPreference {
}
button.setOnClickListener(v -> {
try {
Setting setting = Objects.requireNonNull(Setting.getSettingFromPath(getKey()));
Setting<?> setting = Objects.requireNonNull(Setting.getSettingFromPath(getKey()));
String defaultStringValue = setting.defaultValue.toString();
EditText editText = getEditText();
editText.setText(defaultStringValue);

View File

@@ -53,7 +53,7 @@ public class SharedPrefCategory {
/**
* @param value a NULL parameter removes the value from the preferences
*/
public void saveEnumAsString(@NonNull String key, @Nullable Enum value) {
public void saveEnumAsString(@NonNull String key, @Nullable Enum<?> value) {
saveObjectAsString(key, value);
}
@@ -98,7 +98,7 @@ public class SharedPrefCategory {
}
@NonNull
public <T extends Enum> T getEnum(@NonNull String key, @NonNull T _default) {
public <T extends Enum<?>> T getEnum(@NonNull String key, @NonNull T _default) {
Objects.requireNonNull(_default);
try {
String enumName = preferences.getString(key, null);

View File

@@ -1,42 +1,24 @@
package app.revanced.integrations.syncforreddit;
import android.os.StrictMode;
import app.revanced.integrations.shared.Logger;
import com.laurencedawson.reddit_sync.ui.activities.WebViewActivity;
import java.net.HttpURLConnection;
import java.net.URL;
import app.revanced.integrations.shared.fixes.slink.BaseFixSLinksPatch;
public final class FixSLinksPatch {
public static String resolveSLink(String link) {
if (link.matches(".*reddit\\.com/r/[^/]+/s/[^/]+")) {
Logger.printInfo(() -> "Resolving " + link);
try {
URL url = new URL(link);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setInstanceFollowRedirects(false);
connection.setRequestMethod("HEAD");
/** @noinspection unused*/
public class FixSLinksPatch extends BaseFixSLinksPatch {
static {
INSTANCE = new FixSLinksPatch();
}
// Disable strict mode in order to allow network access on the main thread.
// This is not ideal, but it's the easiest solution for now.
final var currentPolicy = StrictMode.getThreadPolicy();
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
private FixSLinksPatch() {
webViewActivityClass = WebViewActivity.class;
}
connection.connect();
String location = connection.getHeaderField("location");
connection.disconnect();
public static boolean patchResolveSLink(String link) {
return INSTANCE.resolveSLink(link);
}
// Restore the original strict mode policy.
StrictMode.setThreadPolicy(currentPolicy);
Logger.printInfo(() -> "Resolved " + link + " -> " + location);
return location;
} catch (Exception e) {
Logger.printException(() -> "Failed to resolve " + link, e);
}
}
return link;
public static void patchSetAccessToken(String accessToken) {
INSTANCE.setAccessToken(accessToken);
}
}

View File

@@ -6,7 +6,7 @@ import app.revanced.integrations.tiktok.settings.Settings;
@SuppressWarnings("unused")
public class SpoofSimPatch {
private static final Boolean ENABLED = Settings.SIM_SPOOF.get();
private static final boolean ENABLED = Settings.SIM_SPOOF.get();
public static String getCountryIso(String value) {
if (ENABLED) {

View File

@@ -1,14 +1,24 @@
package app.revanced.integrations.youtube;
import android.app.Activity;
import android.graphics.Color;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
public class ThemeHelper {
@Nullable
private static Integer darkThemeColor, lightThemeColor;
private static int themeValue;
public static void setTheme(Object value) {
final int newOrdinalValue = ((Enum) value).ordinal();
/**
* Injection point.
*/
@SuppressWarnings("unused")
public static void setTheme(Enum<?> value) {
final int newOrdinalValue = value.ordinal();
if (themeValue != newOrdinalValue) {
themeValue = newOrdinalValue;
Logger.printDebug(() -> "Theme value: " + newOrdinalValue);
@@ -26,4 +36,50 @@ public class ThemeHelper {
activity.setTheme(Utils.getResourceIdentifier(theme, "style"));
}
/**
* Injection point.
*/
@SuppressWarnings("SameReturnValue")
private static String darkThemeResourceName() {
// Value is changed by Theme patch, if included.
return "@color/yt_black3";
}
/**
* @return The dark theme color as specified by the Theme patch (if included),
* or the dark mode background color unpatched YT uses.
*/
public static int getDarkThemeColor() {
if (darkThemeColor == null) {
darkThemeColor = getColorInt(darkThemeResourceName());
}
return darkThemeColor;
}
/**
* Injection point.
*/
@SuppressWarnings("SameReturnValue")
private static String lightThemeResourceName() {
// Value is changed by Theme patch, if included.
return "@color/yt_white1";
}
/**
* @return The light theme color as specified by the Theme patch (if included),
* or the non dark mode background color unpatched YT uses.
*/
public static int getLightThemeColor() {
if (lightThemeColor == null) {
lightThemeColor = getColorInt(lightThemeResourceName());
}
return lightThemeColor;
}
private static int getColorInt(String colorString) {
if (colorString.startsWith("#")) {
return Color.parseColor(colorString);
}
return Utils.getResourceColor(colorString);
}
}

View File

@@ -380,7 +380,7 @@ public abstract class TrieSearch<T> {
throw new IllegalArgumentException("endIndex: " + endIndex
+ " is greater than texToSearchLength: " + textToSearchLength);
}
if (patterns.size() == 0) {
if (patterns.isEmpty()) {
return false; // No patterns were added.
}
for (int i = startIndex; i < endIndex; i++) {
@@ -393,7 +393,7 @@ public abstract class TrieSearch<T> {
* @return Estimated memory size (in kilobytes) of this instance.
*/
public int getEstimatedMemorySize() {
if (patterns.size() == 0) {
if (patterns.isEmpty()) {
return 0;
}
// Assume the device has less than 32GB of ram (and can use pointer compression),

View File

@@ -1,19 +1,15 @@
package app.revanced.integrations.youtube.patches;
import static app.revanced.integrations.shared.StringRef.str;
import static app.revanced.integrations.youtube.settings.Settings.*;
import static app.revanced.integrations.youtube.shared.NavigationBar.NavigationButton;
import android.net.Uri;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.settings.BaseSettings;
import app.revanced.integrations.shared.settings.EnumSetting;
import app.revanced.integrations.shared.settings.Setting;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.shared.NavigationBar;
import app.revanced.integrations.youtube.shared.PlayerType;
import org.chromium.net.UrlRequest;
import org.chromium.net.UrlResponseInfo;
import org.chromium.net.impl.CronetUrlRequest;
@@ -26,13 +22,12 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import static app.revanced.integrations.shared.StringRef.str;
import static app.revanced.integrations.youtube.settings.Settings.ALT_THUMBNAIL_HOME;
import static app.revanced.integrations.youtube.settings.Settings.ALT_THUMBNAIL_LIBRARY;
import static app.revanced.integrations.youtube.settings.Settings.ALT_THUMBNAIL_PLAYER;
import static app.revanced.integrations.youtube.settings.Settings.ALT_THUMBNAIL_SEARCH;
import static app.revanced.integrations.youtube.settings.Settings.ALT_THUMBNAIL_SUBSCRIPTIONS;
import static app.revanced.integrations.youtube.shared.NavigationBar.NavigationButton;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.shared.settings.Setting;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.youtube.shared.NavigationBar;
import app.revanced.integrations.youtube.shared.PlayerType;
/**
* Alternative YouTube thumbnails.
@@ -134,11 +129,6 @@ public final class AlternativeThumbnailsPatch {
*/
private static volatile long timeToResumeDeArrowAPICalls;
/**
* Used only for debug logging.
*/
private static volatile EnumSetting<ThumbnailOption> currentOptionSetting;
static {
dearrowApiUri = validateSettings();
final int port = dearrowApiUri.getPort();
@@ -162,21 +152,38 @@ public final class AlternativeThumbnailsPatch {
return apiUri;
}
private static EnumSetting<ThumbnailOption> optionSettingForCurrentNavigation() {
if (NavigationBar.isSearchBarActive()) { // Must check search first.
return ALT_THUMBNAIL_SEARCH;
}
private static ThumbnailOption optionSettingForCurrentNavigation() {
// Must check player type first, as search bar can be active behind the player.
if (PlayerType.getCurrent().isMaximizedOrFullscreen()) {
return ALT_THUMBNAIL_PLAYER;
return ALT_THUMBNAIL_PLAYER.get();
}
if (NavigationButton.HOME.isSelected()) {
return ALT_THUMBNAIL_HOME;
// Must check second, as search can be from any tab.
if (NavigationBar.isSearchBarActive()) {
return ALT_THUMBNAIL_SEARCH.get();
}
if (NavigationButton.SUBSCRIPTIONS.isSelected() || NavigationButton.NOTIFICATIONS.isSelected()) {
return ALT_THUMBNAIL_SUBSCRIPTIONS;
// Avoid checking which navigation button is selected, if all other settings are the same.
ThumbnailOption homeOption = ALT_THUMBNAIL_HOME.get();
ThumbnailOption subscriptionsOption = ALT_THUMBNAIL_SUBSCRIPTIONS.get();
ThumbnailOption libraryOption = ALT_THUMBNAIL_LIBRARY.get();
if ((homeOption == subscriptionsOption) && (homeOption == libraryOption)) {
return homeOption; // All are the same option.
}
NavigationButton selectedNavButton = NavigationButton.getSelectedNavigationButton();
if (selectedNavButton == null) {
// Unknown tab, treat as the home tab;
return homeOption;
}
if (selectedNavButton == NavigationButton.HOME) {
return homeOption;
}
if (selectedNavButton == NavigationButton.SUBSCRIPTIONS || selectedNavButton == NavigationButton.NOTIFICATIONS) {
return subscriptionsOption;
}
// A library tab variant is active.
return ALT_THUMBNAIL_LIBRARY;
return libraryOption;
}
/**
@@ -254,14 +261,7 @@ public final class AlternativeThumbnailsPatch {
*/
public static String overrideImageURL(String originalUrl) {
try {
EnumSetting<ThumbnailOption> optionSetting = optionSettingForCurrentNavigation();
ThumbnailOption option = optionSetting.get();
if (BaseSettings.DEBUG.get()) {
if (currentOptionSetting != optionSetting) {
currentOptionSetting = optionSetting;
Logger.printDebug(() -> "Changed to setting: " + optionSetting.key);
}
}
ThumbnailOption option = optionSettingForCurrentNavigation();
if (option == ThumbnailOption.ORIGINAL) {
return originalUrl;

View File

@@ -3,7 +3,7 @@ package app.revanced.integrations.youtube.patches;
import app.revanced.integrations.youtube.shared.PlayerType;
@SuppressWarnings("unused")
public class MinimizedPlaybackPatch {
public class BackgroundPlaybackPatch {
/**
* Injection point.
@@ -35,7 +35,7 @@ public class MinimizedPlaybackPatch {
/**
* Injection point.
*/
public static boolean overrideMinimizedPlaybackAvailable() {
public static boolean overrideBackgroundPlaybackAvailable() {
// This could be done entirely in the patch,
// but having a unique method to search for makes manually inspecting the patched apk much easier.
return true;

View File

@@ -1,22 +1,33 @@
package app.revanced.integrations.youtube.patches;
import static app.revanced.integrations.shared.StringRef.str;
import android.widget.ImageView;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public class CustomPlayerOverlayOpacityPatch {
public static void changeOpacity(ImageView imageView) {
private static final int PLAYER_OVERLAY_OPACITY_LEVEL;
static {
int opacity = Settings.PLAYER_OVERLAY_OPACITY.get();
if (opacity < 0 || opacity > 100) {
Utils.showToastLong("Player overlay opacity must be between 0-100");
Utils.showToastLong(str("revanced_player_overlay_opacity_invalid_toast"));
Settings.PLAYER_OVERLAY_OPACITY.resetToDefault();
opacity = Settings.PLAYER_OVERLAY_OPACITY.defaultValue;
}
imageView.setImageAlpha((opacity * 255) / 100);
PLAYER_OVERLAY_OPACITY_LEVEL = (opacity * 255) / 100;
}
/**
* Injection point.
*/
public static void changeOpacity(ImageView imageView) {
imageView.setImageAlpha(PLAYER_OVERLAY_OPACITY_LEVEL);
}
}

View File

@@ -1,13 +1,8 @@
package app.revanced.integrations.youtube.patches;
import android.annotation.SuppressLint;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.youtube.settings.Settings;
/** @noinspection unused*/

View File

@@ -1,10 +0,0 @@
package app.revanced.integrations.youtube.patches;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class EnableTabletLayoutPatch {
public static boolean enableTabletLayout() {
return Settings.TABLET_LAYOUT.get();
}
}

View File

@@ -4,7 +4,13 @@ import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public class HideAutoplayButtonPatch {
public static boolean isButtonShown() {
return !Settings.HIDE_AUTOPLAY_BUTTON.get();
private static final boolean HIDE_AUTOPLAY_BUTTON_ENABLED = Settings.HIDE_AUTOPLAY_BUTTON.get();
/**
* Injection point.
*/
public static boolean hideAutoPlayButton() {
return HIDE_AUTOPLAY_BUTTON_ENABLED;
}
}

View File

@@ -1,29 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import app.revanced.integrations.youtube.patches.spoof.SpoofAppVersionPatch;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Utils;
@SuppressWarnings("unused")
public class HideBreakingNewsPatch {
/**
* When spoofing to app versions 17.31.00 and older, the watch history preview bar uses
* the same layout components as the breaking news shelf.
*
* Breaking news does not appear to be present in these older versions anyways.
*/
private static final boolean isSpoofingOldVersionWithHorizontalCardListWatchHistory =
SpoofAppVersionPatch.isSpoofingToLessThan("18.01.00");
/**
* Injection point.
*/
public static void hideBreakingNews(View view) {
if (!Settings.HIDE_BREAKING_NEWS.get()
|| isSpoofingOldVersionWithHorizontalCardListWatchHistory) return;
Utils.hideViewByLayoutParams(view);
}
}

View File

@@ -2,7 +2,11 @@ package app.revanced.integrations.youtube.patches;
import app.revanced.integrations.youtube.settings.Settings;
/**
* Patch is obsolete and will be deleted in a future release
*/
@SuppressWarnings("unused")
@Deprecated()
public class HideEmailAddressPatch {
//Used by app.revanced.patches.youtube.layout.personalinformation.patch.HideEmailAddressPatch
public static int hideEmailAddress(int originalValue) {

View File

@@ -1,14 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Utils;
@SuppressWarnings("unused")
public class HideLoadMoreButtonPatch {
public static void hideLoadMoreButton(View view){
if(!Settings.HIDE_LOAD_MORE_BUTTON.get()) return;
Utils.hideViewByLayoutParams(view);
}
}

View File

@@ -0,0 +1,166 @@
package app.revanced.integrations.youtube.patches;
import static app.revanced.integrations.shared.StringRef.str;
import static app.revanced.integrations.youtube.patches.MiniplayerPatch.MiniplayerType.*;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class MiniplayerPatch {
/**
* Mini player type. Null fields indicates to use the original un-patched value.
*/
public enum MiniplayerType {
/** Unmodified type, and same as un-patched. */
ORIGINAL(null, null),
PHONE(false, null),
TABLET(true, null),
MODERN_1(null, 1),
MODERN_2(null, 2),
MODERN_3(null, 3);
/**
* Legacy tablet hook value.
*/
@Nullable
final Boolean legacyTabletOverride;
/**
* Modern player type used by YT.
*/
@Nullable
final Integer modernPlayerType;
MiniplayerType(@Nullable Boolean legacyTabletOverride, @Nullable Integer modernPlayerType) {
this.legacyTabletOverride = legacyTabletOverride;
this.modernPlayerType = modernPlayerType;
}
public boolean isModern() {
return modernPlayerType != null;
}
}
/**
* Modern subtitle overlay for {@link MiniplayerType#MODERN_2}.
* Resource is not present in older targets, and this field will be zero.
*/
private static final int MODERN_OVERLAY_SUBTITLE_TEXT
= Utils.getResourceIdentifier("modern_miniplayer_subtitle_text", "id");
private static final MiniplayerType CURRENT_TYPE = Settings.MINIPLAYER_TYPE.get();
private static final boolean HIDE_EXPAND_CLOSE_ENABLED =
(CURRENT_TYPE == MODERN_1 || CURRENT_TYPE == MODERN_3) && Settings.MINIPLAYER_HIDE_EXPAND_CLOSE.get();
private static final boolean HIDE_SUBTEXT_ENABLED =
(CURRENT_TYPE == MODERN_1 || CURRENT_TYPE == MODERN_3) && Settings.MINIPLAYER_HIDE_SUBTEXT.get();
private static final boolean HIDE_REWIND_FORWARD_ENABLED =
CURRENT_TYPE == MODERN_1 && Settings.MINIPLAYER_HIDE_REWIND_FORWARD.get();
private static final int OPACITY_LEVEL;
static {
int opacity = Settings.MINIPLAYER_OPACITY.get();
if (opacity < 0 || opacity > 100) {
Utils.showToastLong(str("revanced_miniplayer_opacity_invalid_toast"));
Settings.MINIPLAYER_OPACITY.resetToDefault();
opacity = Settings.MINIPLAYER_OPACITY.defaultValue;
}
OPACITY_LEVEL = (opacity * 255) / 100;
}
/**
* Injection point.
*/
public static boolean getLegacyTabletMiniplayerOverride(boolean original) {
Boolean isTablet = CURRENT_TYPE.legacyTabletOverride;
return isTablet == null
? original
: isTablet;
}
/**
* Injection point.
*/
public static boolean getModernMiniplayerOverride(boolean original) {
return CURRENT_TYPE == ORIGINAL
? original
: CURRENT_TYPE.isModern();
}
/**
* Injection point.
*/
public static int getModernMiniplayerOverrideType(int original) {
Integer modernValue = CURRENT_TYPE.modernPlayerType;
return modernValue == null
? original
: modernValue;
}
/**
* Injection point.
*/
public static void adjustMiniplayerOpacity(ImageView view) {
if (CURRENT_TYPE == MODERN_1) {
view.setImageAlpha(OPACITY_LEVEL);
}
}
/**
* Injection point.
*/
public static void hideMiniplayerExpandClose(ImageView view) {
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_EXPAND_CLOSE_ENABLED, view);
}
/**
* Injection point.
*/
public static void hideMiniplayerRewindForward(ImageView view) {
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_REWIND_FORWARD_ENABLED, view);
}
/**
* Injection point.
*/
public static void hideMiniplayerSubTexts(View view) {
// Different subviews are passed in, but only TextView and layouts are of interest here.
final boolean hideView = HIDE_SUBTEXT_ENABLED && (view instanceof TextView || view instanceof LinearLayout);
Utils.hideViewByRemovingFromParentUnderCondition(hideView, view);
}
/**
* Injection point.
*/
public static void playerOverlayGroupCreated(View group) {
// Modern 2 has an half broken subtitle that is always present.
// Always hide it to make the miniplayer mostly usable.
if (CURRENT_TYPE == MODERN_2 && MODERN_OVERLAY_SUBTITLE_TEXT != 0) {
if (group instanceof ViewGroup) {
View subtitleText = Utils.getChildView((ViewGroup) group, true,
view -> view.getId() == MODERN_OVERLAY_SUBTITLE_TEXT);
if (subtitleText != null) {
subtitleText.setVisibility(View.GONE);
Logger.printDebug(() -> "Modern overlay subtitle view set to hidden");
}
}
}
}
}

View File

@@ -1,5 +1,6 @@
package app.revanced.integrations.youtube.patches;
import static app.revanced.integrations.shared.Utils.hideViewUnderCondition;
import static app.revanced.integrations.youtube.shared.NavigationBar.NavigationButton;
import android.view.View;
@@ -7,7 +8,7 @@ import android.view.View;
import java.util.EnumMap;
import java.util.Map;
import app.revanced.integrations.shared.Logger;
import android.widget.TextView;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
@@ -22,7 +23,7 @@ public final class NavigationButtonsPatch {
}
};
private static final Boolean SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON
private static final boolean SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON
= Settings.SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON.get();
/**
@@ -40,4 +41,11 @@ public final class NavigationButtonsPatch {
tabView.setVisibility(View.GONE);
}
}
/**
* Injection point.
*/
public static void hideNavigationButtonLabels(TextView navigationLabelsView) {
hideViewUnderCondition(Settings.HIDE_NAVIGATION_BUTTON_LABELS, navigationLabelsView);
}
}

View File

@@ -2,8 +2,6 @@ package app.revanced.integrations.youtube.patches;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import app.revanced.integrations.youtube.shared.PlayerOverlays;
@SuppressWarnings("unused")

View File

@@ -176,12 +176,6 @@ public class ReturnYouTubeDislikePatch {
textView.removeTextChangedListener(oldUiTextWatcher);
textView.addTextChangedListener(oldUiTextWatcher);
/**
* If the patch is changed to include the dislikes button as a parameter to this method,
* then if the button is already selected the dislikes could be adjusted using
* {@link ReturnYouTubeDislike#setUserVote(Vote)}
*/
updateOldUIDislikesTextView();
} catch (Exception ex) {
@@ -227,6 +221,10 @@ public class ReturnYouTubeDislikePatch {
String conversionContextString = conversionContext.toString();
if (isRollingNumber && !conversionContextString.contains("video_action_bar.eml|")) {
return original;
}
final CharSequence replacement;
if (conversionContextString.contains("|segmented_like_dislike_button.eml|")) {
// Regular video.
@@ -241,7 +239,7 @@ public class ReturnYouTubeDislikePatch {
true, isRollingNumber);
} else if (!isRollingNumber && conversionContextString.contains("|shorts_dislike_button.eml|")) {
// Litho Shorts player.
if (!Settings.RYD_SHORTS.get()) {
if (!Settings.RYD_SHORTS.get() || Settings.HIDE_SHORTS_DISLIKE_BUTTON.get()) {
// Must clear the current video here, otherwise if the user opens a regular video
// then opens a litho short (while keeping the regular video on screen), then closes the short,
// the original video may show the incorrect dislike value.
@@ -295,6 +293,7 @@ public class ReturnYouTubeDislikePatch {
@NonNull String original) {
try {
CharSequence replacement = onLithoTextLoaded(conversionContext, original, true);
String replacementString = replacement.toString();
if (!replacementString.equals(original)) {
rollingNumberSpan = replacement;
@@ -314,19 +313,25 @@ public class ReturnYouTubeDislikePatch {
*/
public static float onRollingNumberMeasured(String text, float measuredTextWidth) {
try {
if (Settings.RYD_ENABLED.get() && !Settings.RYD_COMPACT_LAYOUT.get()) {
if (Settings.RYD_ENABLED.get()) {
if (ReturnYouTubeDislike.isPreviouslyCreatedSegmentedSpan(text)) {
// +1 pixel is needed for some foreign languages that measure
// the text different from what is used for layout (Greek in particular).
// Probably a bug in Android, but who knows.
// Single line mode is also used as an additional fix for this issue.
return measuredTextWidth + ReturnYouTubeDislike.leftSeparatorBounds.right
+ ReturnYouTubeDislike.leftSeparatorShapePaddingPixels + 1;
if (Settings.RYD_COMPACT_LAYOUT.get()) {
return measuredTextWidth + 1;
}
return measuredTextWidth + 1
+ ReturnYouTubeDislike.leftSeparatorBounds.right
+ ReturnYouTubeDislike.leftSeparatorShapePaddingPixels;
}
}
} catch (Exception ex) {
Logger.printException(() -> "onRollingNumberMeasured failure", ex);
}
return measuredTextWidth;
}
@@ -344,10 +349,12 @@ public class ReturnYouTubeDislikePatch {
} else {
view.setCompoundDrawables(separator, null, null, null);
}
// Disliking can cause the span to grow in size, which is ok and is laid out correctly,
// but if the user then removes their dislike the layout will not adjust to the new shorter width.
// Use a center alignment to take up any extra space.
view.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
// Single line mode does not clip words if the span is larger than the view bounds.
// The styled span applied to the view should always have the same bounds,
// but use this feature just in case the measurements are somehow off by a few pixels.
@@ -449,7 +456,7 @@ public class ReturnYouTubeDislikePatch {
if (!Settings.RYD_ENABLED.get()) {
return false;
}
if (!Settings.RYD_SHORTS.get()) {
if (!Settings.RYD_SHORTS.get() || Settings.HIDE_SHORTS_DISLIKE_BUTTON.get()) {
// Must clear the data here, in case a new video was loaded while PlayerType
// suggested the video was not a short (can happen when spoofing to an old app version).
clearData();

Some files were not shown because too many files have changed in this diff Show More