feat: ui tweaks

- hide chat input bar sharing drawer button
This commit is contained in:
rhunk 2023-06-23 18:49:47 +02:00
parent 2b30883157
commit 2fa8574151
4 changed files with 7 additions and 1 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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
)

View File

@ -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