Skip to content

Commit

Permalink
chore: Merge branch dev to main (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
crimera authored Mar 2, 2024
2 parents bd7c6e2 + a67a520 commit d0d6a53
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.9.1-dev.1](https://github.com/crimera/piko/compare/v1.9.0...v1.9.1-dev.1) (2024-03-02)


### Bug Fixes

* **Twitter:** Only show settings category if patch is applied ([2141680](https://github.com/crimera/piko/commit/21416800ce7176c713b1521649d9760fcd450158))

# [1.9.0](https://github.com/crimera/piko/compare/v1.8.1...v1.9.0) (2024-03-02)


Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 1.9.0
version = 1.9.1-dev.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package crimera.patches.twitter.interaction.downloads.changedirectory

import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
Expand All @@ -12,6 +13,7 @@ import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import crimera.patches.twitter.interaction.downloads.changedirectory.fingerprints.SetDownloadDestinationFingerprint
import crimera.patches.twitter.misc.settings.SettingsPatch.UTILS_DESCRIPTOR
import crimera.patches.twitter.misc.settings.fingerprints.SettingsStatusLoadFingerprint

@Patch(
name = "Custom download folder",
Expand All @@ -21,7 +23,7 @@ import crimera.patches.twitter.misc.settings.SettingsPatch.UTILS_DESCRIPTOR
)
@Suppress("unused")
object ChangeDownloadDirPatch: BytecodePatch(
setOf(SetDownloadDestinationFingerprint)
setOf(SetDownloadDestinationFingerprint, SettingsStatusLoadFingerprint)
) {
private const val GETFOLDER_DESCRIPTOR =
"invoke-static {p1}, $UTILS_DESCRIPTOR;->getVideoFolder(Ljava/lang/String;)Ljava/lang/String;"
Expand All @@ -45,5 +47,10 @@ object ChangeDownloadDirPatch: BytecodePatch(
$GETFOLDER_DESCRIPTOR
move-result-object p1
""".trimIndent())

SettingsStatusLoadFingerprint.result!!.mutableMethod.addInstruction(
0,
"invoke-static {}, Lapp/revanced/integrations/twitter/settings/SettingsStatus;->enableDownload()V"
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package crimera.patches.twitter.misc.settings.fingerprints

import app.revanced.patcher.fingerprint.MethodFingerprint

object SettingsStatusLoadFingerprint: MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("Lapp/revanced/integrations/twitter/settings/SettingsStatus;") &&
methodDef.name == "load"
}
)

0 comments on commit d0d6a53

Please sign in to comment.