commit 2fa8574151b50da080ca9be0261aa04673c247ca parent 2b308831573d72d3924e78428b0a28005eecde12 Author: rhunk <101876869+rhunk@users.noreply.github.com> Date: Fri, 23 Jun 2023 18:49:47 +0200 feat: ui tweaks - hide chat input bar sharing drawer button Diffstat:
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/src/main/assets/lang/en_US.json b/app/src/main/assets/lang/en_US.json @@ -262,6 +262,7 @@ "hide_ui_elements": { "remove_call_buttons": "Remove Call Buttons", "remove_cognac_button": "Remove Cognac Button", + "remove_live_location_share_button": "Remove Live Location Share Button", "remove_stickers_button": "Remove Stickers Button", "remove_voice_record_button": "Remove Voice Record Button", "remove_camera_borders": "Remove Camera Borders" diff --git a/app/src/main/assets/lang/fr_FR.json b/app/src/main/assets/lang/fr_FR.json @@ -261,6 +261,7 @@ "hide_ui_elements": { "remove_call_buttons": "Supprimer le bouton d'appel", "remove_cognac_button": "Supprimer le bouton des Activités", + "remove_live_location_share_button": "Supprimer le bouton de partage de la localisation en direct", "remove_stickers_button": "Supprimer le bouton des autocollants", "remove_voice_record_button": "Supprimer le bouton d'enregistrement de la voix", "remove_camera_borders": "Supprimer les bordures de la caméra" diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/config/ConfigProperty.kt b/app/src/main/kotlin/me/rhunk/snapenhance/config/ConfigProperty.kt @@ -188,11 +188,12 @@ enum class ConfigProperty( "hide_ui_elements", ConfigCategory.UI_TWEAKS, ConfigStateListValue( - listOf("remove_voice_record_button", "remove_stickers_button", "remove_cognac_button", "remove_call_buttons", "remove_camera_borders"), + listOf("remove_voice_record_button", "remove_stickers_button", "remove_cognac_button", "remove_live_location_share_button", "remove_call_buttons", "remove_camera_borders"), mutableMapOf( "remove_voice_record_button" to false, "remove_stickers_button" to false, "remove_cognac_button" to false, + "remove_live_location_share_button" to false, "remove_call_buttons" to false, "remove_camera_borders" to false ) diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/ui/UITweaks.kt b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/ui/UITweaks.kt @@ -118,6 +118,9 @@ class UITweaks : Feature("UITweaks", loadParams = FeatureLoadParams.ACTIVITY_CRE if (getIdentifier("chat_input_bar_sticker", "id") == viewId && hiddenElements["remove_stickers_button"] == true) { view.visibility = View.GONE } + if (getIdentifier("chat_input_bar_sharing_drawer_button", "id") == viewId && hiddenElements["remove_live_location_share_button"] == true) { + param.setResult(null) + } if (viewId == callButton1 || viewId == callButton2) { if (hiddenElements["remove_call_buttons"] == false) return@hook if (view.visibility == View.GONE) return@hook