Skip to content

Commit

Permalink
Remove expiration on incoming Expiring Photos
Browse files Browse the repository at this point in the history
  • Loading branch information
ElJaviLuki committed Jun 21, 2022
1 parent 33ea3ac commit 75cea4e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Grindr Plus is a Xposed Module that allows you to unlock some features in Grindr
- See 'Read' and 'Typing...' message states.
- Allow taking screenshots in any part of the app (including albums and expiring photos).
- Unlimited expiring photos.
- Remove expiration on incoming expiring photos, allowing to see them any number of times you want.
- Extra profile fields in the so-called CruiseViewHolder ('Profile ID', and exact time of 'Last seen')
- Make videocalls even if you didn't start a chat with the recipient.
- Access to some user-hidden features (developer features)
Expand Down
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 @@ -9,5 +9,6 @@ object Constants {
val RETURN_TRUE = XC_MethodReplacement.returnConstant(true)
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)
}
}
4 changes: 3 additions & 1 deletion app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ class Hooker : IXposedHookLoadPackage {
//I've set this to max 3 min. If we make an UI for Hook Settings, we'll let the user to change this.
Hooks.hookOnlineIndicatorDuration(3.minutes)
Hooks.unlimitedTaps()
Hooks.removeExpirationOnExpiringPhotos()
}
})
}
)
}

companion object {
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,19 @@ object Hooks {
Constants.Returns.RETURN_TRUE
)
}

/**
* Hook the method that returns the duration of the expiring photos.
* This way, the photos will not expire and you will be able to see them any time you want.
*
* @author ElJaviLuki
*/
fun removeExpirationOnExpiringPhotos() {
val class_ExpiringImageBody = XposedHelpers.findClass(GApp.model.ExpiringImageBody, Hooker.pkgParam!!.classLoader)
XposedHelpers.findAndHookMethod(
class_ExpiringImageBody,
GApp.model.ExpiringImageBody_.getDuration,
Constants.Returns.RETURN_LONG_MAX_VALUE
)
}
}
5 changes: 5 additions & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class Obfuscation {
object model {
private const val _model = Constants.GRINDR_PKG + ".model"

const val ExpiringImageBody = "$_model.ExpiringImageBody"
object ExpiringImageBody_ {
const val getDuration = "getDuration"
}

const val ExpiringPhotoStatusResponse = "$_model.ExpiringPhotoStatusResponse"
object ExpiringPhotoStatusResponse_ {
const val getTotal = "getTotal"
Expand Down

0 comments on commit 75cea4e

Please sign in to comment.