Skip to content

Commit

Permalink
Fixes #37 - Unlimited grid on the "Fresh" section is back
Browse files Browse the repository at this point in the history
  • Loading branch information
ElJaviLuki committed Jan 2, 2023
1 parent ad5cd86 commit 30b8fc5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ object Constants {
val RETURN_FALSE: XC_MethodReplacement = returnConstant(false)
val RETURN_INTEGER_MAX_VALUE: XC_MethodReplacement = returnConstant(Int.MAX_VALUE)
val RETURN_LONG_MAX_VALUE: XC_MethodReplacement = returnConstant(Long.MAX_VALUE)
val RETURN_ZERO: XC_MethodReplacement = returnConstant(0)
}
}
35 changes: 35 additions & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import com.eljaviluki.grindrplus.Constants.Returns.RETURN_TRUE
import com.eljaviluki.grindrplus.Constants.Returns.RETURN_FALSE
import com.eljaviluki.grindrplus.Constants.Returns.RETURN_INTEGER_MAX_VALUE
import com.eljaviluki.grindrplus.Constants.Returns.RETURN_LONG_MAX_VALUE
import com.eljaviluki.grindrplus.Constants.Returns.RETURN_ZERO
import com.eljaviluki.grindrplus.Obfuscation.GApp
import com.eljaviluki.grindrplus.decorated.persistence.model.Profile
import de.robv.android.xposed.XC_MethodReplacement
Expand Down Expand Up @@ -283,6 +284,40 @@ object Hooks {
class_IUserSession,
RETURN_TRUE
)

val class_UpsellsV8 = findClass(
GApp.model.UpsellsV8,
Hooker.pkgParam.classLoader
)

findAndHookMethod(
class_UpsellsV8,
GApp.model.UpsellsV8_.getMpuFree,
RETURN_INTEGER_MAX_VALUE
)

findAndHookMethod(
class_UpsellsV8,
GApp.model.UpsellsV8_.getMpuXtra,
RETURN_ZERO
)

val class_Inserts = findClass(
GApp.model.Inserts,
Hooker.pkgParam.classLoader
)

findAndHookMethod(
class_Inserts,
GApp.model.Inserts_.getMpuFree,
RETURN_INTEGER_MAX_VALUE
)

findAndHookMethod(
class_Inserts,
GApp.model.Inserts_.getMpuXtra,
RETURN_ZERO
)
}

/**
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ object Obfuscation {
object Feature_ {
const val isGranted = "isGranted"
}

const val UpsellsV8 = "$_model.UpsellsV8"
object UpsellsV8_ {
const val getMpuFree = "getMpuFree"
const val getMpuXtra = "getMpuXtra"
}

const val Inserts = "$_model.Inserts"
object Inserts_ {
const val getMpuFree = "getMpuFree"
const val getMpuXtra = "getMpuXtra"
}
}

object persistence {
Expand Down

0 comments on commit 30b8fc5

Please sign in to comment.