commit c72cc1d3203245a8a812f7917ea99c6defa4a3c0 parent 97bce2011b9c6cd5d6ac4e42f129a48d65955a8d Author: rhunk <101876869+rhunk@users.noreply.github.com> Date: Sat, 8 Jun 2024 17:49:18 +0200 feat(ui_tweaks): remove post to story buttons Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com> Diffstat:
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json @@ -1251,7 +1251,8 @@ "hide_live_location_share_button": "Remove Live Location Share Button", "hide_stickers_button": "Remove Stickers Button", "hide_voice_record_button": "Remove Voice Record Button", - "hide_unread_chat_hint": "Remove Unread Chat Hint" + "hide_unread_chat_hint": "Remove Unread Chat Hint", + "hide_post_to_story_buttons": "Remove Post to Story buttons before sending a Snap" }, "hide_story_suggestions": { "hide_friend_suggestions": "Hide friend suggestions", diff --git a/common/src/main/kotlin/me/rhunk/snapenhance/common/config/impl/UserInterfaceTweaks.kt b/common/src/main/kotlin/me/rhunk/snapenhance/common/config/impl/UserInterfaceTweaks.kt @@ -75,6 +75,7 @@ class UserInterfaceTweaks : ConfigContainer() { "hide_chat_call_buttons", "hide_profile_call_buttons", "hide_unread_chat_hint", + "hide_post_to_story_buttons", ) { requireRestart() } val operaMediaQuickInfo = boolean("opera_media_quick_info") { requireRestart() } val oldBitmojiSelfie = unique("old_bitmoji_selfie", "2d", "3d") { requireCleanCache() } diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/UITweaks.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/UITweaks.kt @@ -159,6 +159,7 @@ class UITweaks : Feature("UITweaks", loadParams = FeatureLoadParams.ACTIVITY_CRE } if ( + ((viewId == getId("post_tool", "id") || viewId == getId("story_button", "id")) && hiddenElements.contains("hide_post_to_story_buttons")) || (viewId == chatNoteRecordButton && hiddenElements.contains("hide_voice_record_button")) || (viewId == getId("chat_input_bar_sticker", "id") && hiddenElements.contains("hide_stickers_button")) || (viewId == getId("chat_input_bar_sharing_drawer_button", "id") && hiddenElements.contains("hide_live_location_share_button")) ||