Skip to content

Commit

Permalink
GrindrPlus: Updates for latest 24.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
R0rt1z2 committed Nov 17, 2024
1 parent 4521171 commit 472886b
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@ jobs:
curl -F document=@"${{ env.DEBUG_APK }}" \
-F chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \
-F parse_mode=Markdown \
-F caption="${{ env.VERSION_INFO }} (debug) | [${{ env.COMMIT_SHA }}](${{ env.COMMIT_URL }})" \
https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument
- name: Upload Signed Release APK to Telegram
run: |
curl -F document=@"${{ env.RELEASE_APK }}" \
-F chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \
-F parse_mode=Markdown \
-F caption="${{ env.VERSION_INFO }} (release) | [${{ env.COMMIT_SHA }}](${{ env.COMMIT_URL }})" \
https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument
- name: Upload Debug APK as Artifact
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

android {
val grindrVersions = listOf("24.17.0", "24.17.1")
val grindrVersions = listOf("24.17.1")

namespace = "com.grindrplus"
compileSdk = 34
Expand All @@ -19,7 +19,7 @@ android {
minSdk = 21
targetSdk = 34
versionCode = 14
versionName = "3.2.4-${grindrVersions.joinToString("_")}_$gitCommitHash"
versionName = "3.2.5-${grindrVersions.joinToString("_")}_$gitCommitHash"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/grindrplus/GrindrPlus.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ object GrindrPlus {
var currentActivity: Activity? = null
private set

private val userAgent = "d5.u"
private val userAgent = "d5.t"
private val userSession = "com.grindrapp.android.storage.b"

fun init(modulePath: String, application: Application) {
Expand Down
42 changes: 41 additions & 1 deletion app/src/main/java/com/grindrplus/commands/Profile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.grindrplus.GrindrPlus
import com.grindrplus.core.Utils.openChat
import com.grindrplus.core.Utils.openProfile
import com.grindrplus.ui.Utils.copyToClipboard
import okhttp3.RequestBody.Companion.toRequestBody

class Profile(
recipient: String,
Expand Down Expand Up @@ -70,7 +71,7 @@ class Profile(
val silent = "silent" in args
if (args.isNotEmpty()) {
GrindrPlus.runCatching {
val response = GrindrPlus.httpClient.sendRequest(
val response = httpClient.sendRequest(
"https://grindr.mobi/v3/me/blocks/${args[0]}",
"DELETE"
)
Expand Down Expand Up @@ -108,6 +109,45 @@ class Profile(
}
}

@Command("report", help = "Report a user")
fun report(args: List<String>) {
val profileId = if (args.isNotEmpty()) args[0] else sender
val reason = if (args.size > 1) args[1] else "SPAM"
val body = """
{
"reason": "$reason",
"comment": "",
"locations": [
"CHAT_MESSAGE"
]
}
""".trimIndent()
GrindrPlus.runCatching {
val response = httpClient.sendRequest(
"https://grindr.mobi/v3.1/flags/$profileId",
"POST",
mapOf("Content-Type" to "application/json"),
body.toRequestBody()
)
if (response.isSuccessful) {
showToast(
Toast.LENGTH_LONG,
"User reported successfully"
)
} else {
showToast(
Toast.LENGTH_LONG,
"Failed to report user: ${response.body?.string()}"
)
}
}.onFailure {
GrindrPlus.showToast(
Toast.LENGTH_LONG,
"Failed to report user: ${it.message}"
)
}
}

@SuppressLint("SetTextI18n")
@Command("id", help = "Get and copy profile IDs")
fun id(args: List<String>) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/grindrplus/hooks/DisableAnalytics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DisableAnalytics : Hook(
"Disable analytics",
"Disable Grindr analytics (data collection)"
) {
private val analyticsRestService = "a4.g"
private val analyticsRestService = "L4.a"

override fun init() {
val analyticsRestServiceClass = findClass(analyticsRestService)
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/com/grindrplus/hooks/DisableBoosting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class DisableBoosting : Hook(
) {
private val drawerProfileUiState = "V9.e\$a"
private val radarUiModel = "J7.a\$a"
private val roamOnBoardingFragment = "Aa.c"
private val fabUiModel = "com.grindrapp.android.boost2.presentation.model.FabUIModel"
private val boostStateClass =
"com.grindrapp.android.ui.drawer.model.SideDrawerMicrosButtonState\$Unavailable"
Expand Down Expand Up @@ -50,7 +51,11 @@ class DisableBoosting : Hook(
}
}

findClass(fabUiModel).hook("component2", HookStage.AFTER) { param -> // getIsVisible()
findClass(fabUiModel).hook("createFragment", HookStage.BEFORE) { param ->
param.setResult(null) // Don't let the fragment be created
}

findClass(roamOnBoardingFragment).hook("a", HookStage.BEFORE) { param -> // showBoostMeButton
param.setResult(false)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ class SettingsFragment : Fragment() {
container?.addView(otherSettingsTitle)
container?.addView(createDynamicSettingView(context, "Online indicator duration (mins)", "Control when your green dot disappears after inactivity", "online_indicator"))
container?.addView(createDynamicSettingView(context, "Favorites grid size", "Customize grid size of the layout for the favorites tab", "favorites_grid_columns"))

container?.addView(createToggleableSettingView(context, "Confirm block", "Show a confirmation dialog before blocking a user", "confirm_block"))
}

private fun showResetConfirmationDialog() {
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"versionName": "24.17.1",
"versionCode": 131246
"versionCode": 131488
}

0 comments on commit 472886b

Please sign in to comment.