Skip to content

Commit

Permalink
Fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Keeperorowner committed Dec 23, 2024
1 parent 136837c commit 66321f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/cc/ioctl/tmoe/hook/func/BoostSpeed.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object BoostSpeed : CommonDynamicHook() {
findMethod(loadClass("org.telegram.messenger.FileLoadOperation")) {
name == "updateParams"
}.hookAfter { param ->
if (!isEnabled) return@hookAfter
if (!isEnabled) return@hookAfter
XposedHelpers.setIntField(param.thisObject, "downloadChunkSizeBig", 1048576)
XposedHelpers.setObjectField(param.thisObject, "maxDownloadRequests", 12)
XposedHelpers.setObjectField(param.thisObject, "maxDownloadRequestsBig", 12)
Expand All @@ -21,7 +21,7 @@ object BoostSpeed : CommonDynamicHook() {
findMethod(loadClass("org.telegram.messenger.FileUploadOperation")) {
name == "startUploadRequest"
}.hookAfter { param ->
if (!isEnabled) return@hookAfter
if (!isEnabled) return@hookAfter
XposedHelpers.setIntField(param.thisObject, "uploadChunkSize", 1048576)
XposedHelpers.setObjectField(param.thisObject, "maxRequestsCount", 8)
}
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/java/cc/ioctl/tmoe/hook/func/GhostMode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ object GhostMode : CommonDynamicHook() {
parameterTypes[8] == java.lang.Boolean.TYPE &&
parameterTypes[9] == Integer.TYPE
}.hookBefore { param ->
if (!isEnabled) return@hookBefore


if (!isEnabled) return@hookBefore
val updateStatusClass = loadClass("org.telegram.tgnet.TLRPC\$TL_account_updateStatus")
val requestObject = param.args[0]

Expand Down

0 comments on commit 66321f0

Please sign in to comment.