Skip to content

Commit

Permalink
fix(core/settings_menu): remove inapp SnapEnhance title
Browse files Browse the repository at this point in the history
On devices with a smaller dpi, the other buttons also triggered the menu without clicking on the title
  • Loading branch information
rhunk committed Oct 6, 2024
1 parent beb5217 commit fe8b5ab
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ import me.rhunk.snapenhance.core.ui.menu.AbstractMenu
import me.rhunk.snapenhance.core.util.hook.HookStage
import me.rhunk.snapenhance.core.util.hook.hook
import me.rhunk.snapenhance.core.util.ktx.getId
import me.rhunk.snapenhance.core.util.ktx.getIdentifier

class SettingsMenu : AbstractMenu() {
private val hovaHeaderSearchIconId by lazy {
context.resources.getId("hova_header_search_icon")
}

private val ngsChatLabel by lazy {
context.resources.run {
getString(getIdentifier("ngs_chat_label", "string"))
}
}

override fun init() {
context.androidContext.classLoader.loadClass("com.snap.ui.view.SnapFontTextView").hook("setText", HookStage.BEFORE) { param ->
val view = param.thisObject<View>()
Expand All @@ -29,10 +22,6 @@ class SettingsMenu : AbstractMenu() {
context.bridgeClient.openOverlay(OverlayType.SETTINGS)
}
}

if (param.argNullable<String>(0) == ngsChatLabel) {
param.setArg(0, "SnapEnhance")
}
}
}
}
Expand Down

0 comments on commit fe8b5ab

Please sign in to comment.