Skip to content

Commit

Permalink
Make messages always removable
Browse files Browse the repository at this point in the history
Now you will be able to remove any message (no matter how old it is). You can even remove the recipient's messages!
  • Loading branch information
ElJaviLuki committed Dec 9, 2022
1 parent 5c4cb54 commit a1748a0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Grindr Plus is a Xposed Module that allows you to unlock some features in Grindr
- More accurate online status from other users. (The green dot from other profiles goes off after 3 minutes of inactivity.)
- Allow unlimited taps (no 24h restriction)
- Ability to see who viewed your profile even if you have "Show Me In Viewed Me List" disabled.
- Ability to remove messages from anyone, any time.

## Bugs
* Incognito mode is kinda buggy (it turns off after a little while)
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
applicationId 'com.eljaviluki.grindrplus'
minSdk 21
targetSdk 32
versionCode 11
versionCode 12
versionName genVersionName()
versionNameSuffix getVersionNameSuffix()
}
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ class Hooker : IXposedHookLoadPackage {
} catch (e : Exception) {
e.message?.let { Logger.xLog(it) }
}

try {
Hooks.makeMessagesAlwaysRemovable()
} catch (e : Exception) {
e.message?.let { Logger.xLog(it) }
}
}
}
)
Expand Down
16 changes: 15 additions & 1 deletion app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.eljaviluki.grindrplus.Obfuscation.GApp
import com.eljaviluki.grindrplus.decorated.persistence.model.Profile
import de.robv.android.xposed.XC_MethodReplacement
import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.XposedHelpers
import de.robv.android.xposed.XposedHelpers.*
import kotlin.time.Duration

Expand Down Expand Up @@ -472,4 +471,19 @@ object Hooks {
XC_MethodReplacement.DO_NOTHING
)
}

fun makeMessagesAlwaysRemovable(){
val class_ChatBaseFragmentV2 = findClass(
GApp.ui.chat.ChatBaseFragmentV2,
Hooker.pkgParam.classLoader
)

val class_ChatMessage = findClass(GApp.persistence.model.ChatMessage, Hooker.pkgParam.classLoader)
findAndHookMethod(
class_ChatBaseFragmentV2,
GApp.ui.chat.ChatBaseFragmentV2_._canBeUnsent,
class_ChatMessage,
RETURN_FALSE
)
}
}
9 changes: 9 additions & 0 deletions app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ object Obfuscation {
const val setProfile = "h"
}
}

object chat {
private const val _chat = "$_ui.chat"

const val ChatBaseFragmentV2 = "$_chat.ChatBaseFragmentV2"
object ChatBaseFragmentV2_ {
const val _canBeUnsent = "X1"
}
}
}

object utils {
Expand Down

0 comments on commit a1748a0

Please sign in to comment.