mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-26 12:11:02 +00:00
Compare commits
5 Commits
v2.186.0
...
v2.187.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4680f1dc61 | ||
|
|
70da6d8971 | ||
|
|
1df7df2841 | ||
|
|
c14a7fb66f | ||
|
|
6af4e47947 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew generateMeta
|
run: ./gradlew generateMeta clean
|
||||||
- name: Setup semantic-release
|
- name: Setup semantic-release
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Release
|
- name: Release
|
||||||
|
|||||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [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)
|
# [2.186.0](https://github.com/ReVanced/revanced-patches/compare/v2.185.0...v2.186.0) (2023-07-21)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -66,27 +66,31 @@ class ThemeResourcePatch : ResourcePatch {
|
|||||||
addColorResource(context, "res/values-night/colors.xml", SPLASH_BACKGROUND_COLOR, it)
|
addColorResource(context, "res/values-night/colors.xml", SPLASH_BACKGROUND_COLOR, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit splash screen files and change the background color.
|
// Edit splash screen files and change the background color,
|
||||||
val splashScreenResourceFiles = listOf(
|
// if the background colors are set.
|
||||||
"res/drawable/quantum_launchscreen_youtube.xml",
|
if (darkThemeBackgroundColor != null && lightThemeBackgroundColor != null) {
|
||||||
"res/drawable-sw600dp/quantum_launchscreen_youtube.xml")
|
val splashScreenResourceFiles = listOf(
|
||||||
|
"res/drawable/quantum_launchscreen_youtube.xml",
|
||||||
|
"res/drawable-sw600dp/quantum_launchscreen_youtube.xml")
|
||||||
|
|
||||||
splashScreenResourceFiles.forEach editSplashScreen@ { resourceFile ->
|
splashScreenResourceFiles.forEach editSplashScreen@ { resourceFile ->
|
||||||
context.xmlEditor[resourceFile].use {
|
context.xmlEditor[resourceFile].use {
|
||||||
val layerList = it.file.getElementsByTagName("layer-list").item(0) as Element
|
val layerList = it.file.getElementsByTagName("layer-list").item(0) as Element
|
||||||
|
|
||||||
val childNodes = layerList.childNodes
|
val childNodes = layerList.childNodes
|
||||||
for (i in 0 until childNodes.length) {
|
for (i in 0 until childNodes.length) {
|
||||||
val node = childNodes.item(i)
|
val node = childNodes.item(i)
|
||||||
if (node is Element && node.hasAttribute("android:drawable")) {
|
if (node is Element && node.hasAttribute("android:drawable")) {
|
||||||
node.setAttribute("android:drawable", "@color/$SPLASH_BACKGROUND_COLOR")
|
node.setAttribute("android:drawable", "@color/$SPLASH_BACKGROUND_COLOR")
|
||||||
return@editSplashScreen
|
return@editSplashScreen
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return PatchResultError("Failed to modify launch screen")
|
||||||
}
|
}
|
||||||
return PatchResultError("Failed to modify launch screen")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user