mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 09:53:55 +01:00
Compare commits
10 Commits
v2.186.0-d
...
v2.187.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4680f1dc61 | ||
|
|
70da6d8971 | ||
|
|
1df7df2841 | ||
|
|
c14a7fb66f | ||
|
|
6af4e47947 | ||
|
|
ef704fcf7a | ||
|
|
eefa677b1a | ||
|
|
2bf6d693ec | ||
|
|
acc55fff89 | ||
|
|
82e3ebeeff |
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -30,13 +30,12 @@ jobs:
|
|||||||
${{ runner.home }}/.gradle/caches
|
${{ runner.home }}/.gradle/caches
|
||||||
${{ runner.home }}/.gradle/wrapper
|
${{ runner.home }}/.gradle/wrapper
|
||||||
.gradle
|
.gradle
|
||||||
build
|
|
||||||
node_modules
|
node_modules
|
||||||
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew generateMeta clean --no-daemon
|
run: ./gradlew generateMeta clean
|
||||||
- name: Setup semantic-release
|
- name: Setup semantic-release
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Release
|
- name: Release
|
||||||
|
|||||||
37
CHANGELOG.md
37
CHANGELOG.md
@@ -1,3 +1,40 @@
|
|||||||
|
# [2.187.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.186.1-dev.1...v2.187.0-dev.1) (2023-07-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Sync for Reddit:** add `Disable Sync for Lemmy bottom sheet` patch ([56b535b](https://github.com/ReVanced/revanced-patches/commit/56b535b2a136d4b0afbddf2c8e251889c2555056))
|
||||||
|
|
||||||
|
## [2.186.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.186.0...v2.186.1-dev.1) (2023-07-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Theme:** only set splash screen color if background colors are set ([f058db4](https://github.com/ReVanced/revanced-patches/commit/f058db4ba4300400ac92b4a9790708eb8bde7092))
|
||||||
|
|
||||||
|
# [2.186.0](https://github.com/ReVanced/revanced-patches/compare/v2.185.0...v2.186.0) (2023-07-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Tiktok - Settings:** get instruction registers dynamically ([#2676](https://github.com/ReVanced/revanced-patches/issues/2676)) ([b34e45b](https://github.com/ReVanced/revanced-patches/commit/b34e45b6dafad8e9d567ad65f58a182b8cc04676))
|
||||||
|
* **YouTube - Spoof app version:** update target app version description ([#2666](https://github.com/ReVanced/revanced-patches/issues/2666)) ([307442e](https://github.com/ReVanced/revanced-patches/commit/307442e654ff5486656319d91e4a5f5fb2b92651))
|
||||||
|
* **YouTube - Theme:** allow setting no background color ([8a4e77a](https://github.com/ReVanced/revanced-patches/commit/8a4e77a290a61a1caf93eb8bccaf728c84a3ef53))
|
||||||
|
* **YouTube - Theme:** apply custom seekbar color to shorts ([#2670](https://github.com/ReVanced/revanced-patches/issues/2670)) ([1f6fe3d](https://github.com/ReVanced/revanced-patches/commit/1f6fe3da4284fd768057ef068c7ddf88d3a11049))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Twitter:** remove `Hide view stats` patch ([f0d3800](https://github.com/ReVanced/revanced-patches/commit/f0d38001b34db63f212209afb91eebf59dad2b24))
|
||||||
|
* **Youtube - Theme:** add a switch to enable/disable custom seekbar color ([#2663](https://github.com/ReVanced/revanced-patches/issues/2663)) ([5c39985](https://github.com/ReVanced/revanced-patches/commit/5c39985888cdfe3acfdd8811ff9b6f80e243704e))
|
||||||
|
|
||||||
|
# [2.186.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.4...v2.186.0-dev.5) (2023-07-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Theme:** allow setting no background color ([8a4e77a](https://github.com/ReVanced/revanced-patches/commit/8a4e77a290a61a1caf93eb8bccaf728c84a3ef53))
|
||||||
|
|
||||||
# [2.186.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.3...v2.186.0-dev.4) (2023-07-20)
|
# [2.186.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.3...v2.186.0-dev.4) (2023-07-20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.186.0-dev.4
|
version = 2.187.0-dev.1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object MainActivityOnCreate : MethodFingerprint(
|
||||||
|
customFingerprint = custom@{ method, classDef ->
|
||||||
|
classDef.type.endsWith("MainActivity;") && method.name == "onCreate"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.fingerprints.MainActivityOnCreate
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Disable Sync for Lemmy bottom sheet")
|
||||||
|
@Description("Disables the bottom sheet at the startup that asks you to signup to \"Sync for Lemmy\".")
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.laurencedawson.reddit_sync", ["v23.06.30-13:39"]),
|
||||||
|
Package("com.laurencedawson.reddit_sync.pro"), // Version unknown.
|
||||||
|
Package("com.laurencedawson.reddit_sync.dev") // Version unknown.
|
||||||
|
]
|
||||||
|
)
|
||||||
|
class DisableSyncForLemmyBottomSheetPatch : BytecodePatch(listOf(MainActivityOnCreate)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
MainActivityOnCreate.result?.mutableMethod?.apply {
|
||||||
|
val showBottomSheetIndex = implementation!!.instructions.lastIndex - 1
|
||||||
|
|
||||||
|
removeInstruction(showBottomSheetIndex)
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,8 +45,8 @@ class ThemeResourcePatch : ResourcePatch {
|
|||||||
|
|
||||||
node.textContent = when (node.getAttribute("name")) {
|
node.textContent = when (node.getAttribute("name")) {
|
||||||
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3",
|
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3",
|
||||||
"yt_black4", "yt_status_bar_background_dark", "material_grey_850" -> darkThemeBackgroundColor
|
"yt_black4", "yt_status_bar_background_dark", "material_grey_850"
|
||||||
?: continue
|
-> darkThemeBackgroundColor ?: continue
|
||||||
|
|
||||||
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98",
|
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98",
|
||||||
"yt_white2", "yt_white3", "yt_white4",
|
"yt_white2", "yt_white3", "yt_white4",
|
||||||
@@ -58,36 +58,43 @@ class ThemeResourcePatch : ResourcePatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a dynamic background color to the colors.xml file.
|
// Add a dynamic background color to the colors.xml file.
|
||||||
addResourceColor(context, "res/values/colors.xml",
|
lightThemeBackgroundColor?.let {
|
||||||
SPLASH_BACKGROUND_COLOR, lightThemeBackgroundColor!!)
|
addColorResource(context, "res/values/colors.xml", SPLASH_BACKGROUND_COLOR, it)
|
||||||
addResourceColor(context, "res/values-night/colors.xml",
|
}
|
||||||
SPLASH_BACKGROUND_COLOR, darkThemeBackgroundColor!!)
|
|
||||||
|
|
||||||
// Edit splash screen files and change the background color.
|
darkThemeBackgroundColor?.let {
|
||||||
val splashScreenResourceFiles = listOf(
|
addColorResource(context, "res/values-night/colors.xml", SPLASH_BACKGROUND_COLOR, it)
|
||||||
"res/drawable/quantum_launchscreen_youtube.xml",
|
}
|
||||||
"res/drawable-sw600dp/quantum_launchscreen_youtube.xml")
|
|
||||||
|
|
||||||
splashScreenResourceFiles.forEach editSplashScreen@ { resourceFile ->
|
// Edit splash screen files and change the background color,
|
||||||
context.xmlEditor[resourceFile].use {
|
// if the background colors are set.
|
||||||
val layerList = it.file.getElementsByTagName("layer-list").item(0) as Element
|
if (darkThemeBackgroundColor != null && lightThemeBackgroundColor != null) {
|
||||||
|
val splashScreenResourceFiles = listOf(
|
||||||
|
"res/drawable/quantum_launchscreen_youtube.xml",
|
||||||
|
"res/drawable-sw600dp/quantum_launchscreen_youtube.xml")
|
||||||
|
|
||||||
val childNodes = layerList.childNodes
|
splashScreenResourceFiles.forEach editSplashScreen@ { resourceFile ->
|
||||||
for (i in 0 until childNodes.length) {
|
context.xmlEditor[resourceFile].use {
|
||||||
val node = childNodes.item(i)
|
val layerList = it.file.getElementsByTagName("layer-list").item(0) as Element
|
||||||
if (node is Element && node.hasAttribute("android:drawable")) {
|
|
||||||
node.setAttribute("android:drawable", "@color/$SPLASH_BACKGROUND_COLOR")
|
val childNodes = layerList.childNodes
|
||||||
return@editSplashScreen
|
for (i in 0 until childNodes.length) {
|
||||||
|
val node = childNodes.item(i)
|
||||||
|
if (node is Element && node.hasAttribute("android:drawable")) {
|
||||||
|
node.setAttribute("android:drawable", "@color/$SPLASH_BACKGROUND_COLOR")
|
||||||
|
return@editSplashScreen
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return PatchResultError("Failed to modify launch screen")
|
||||||
}
|
}
|
||||||
return PatchResultError("Failed to modify launch screen")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addResourceColor(
|
private fun addColorResource(
|
||||||
context: ResourceContext,
|
context: ResourceContext,
|
||||||
resourceFile: String,
|
resourceFile: String,
|
||||||
colorName: String,
|
colorName: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user