Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for compatibility #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/src/main/java/com/grindrplus/Hooker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ class Hooker : IXposedHookLoadPackage {
fun toastInvalidVersionName() {
Toast.makeText(
appContext,
"This hook is for client version $TARGET_PKG_VERSION_NAME. (Current: $pkgVersionName) Hook will not be loaded.",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's too long to toast, so split it

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this show the toasts one after another?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far as the result of my tests, it will show toasts one after another. But I still try to find a way to make a toast large enough to show the whole text.

"This hook is for client version $TARGET_PKG_VERSION_NAME (Current: $pkgVersionName).",
Toast.LENGTH_LONG
).show()
Toast.makeText(
appContext,
"Hook may not be loaded successfully.",
Toast.LENGTH_LONG
).show()
}
Expand Down Expand Up @@ -50,7 +55,6 @@ class Hooker : IXposedHookLoadPackage {

if (pkgVersionName != TARGET_PKG_VERSION_NAME) {
toastInvalidVersionName()
return
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow hook newer or older version

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot allow the user to do that. There's a good reason for this: symbol obfuscation mapping varies per version, so if you try to run the hooks with the wrong version, expect undefined behavior and weird bugs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't thought about that before sorry

}

try {
Expand Down