diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json index a37ab2a4..568957ef 100644 --- a/common/src/main/assets/lang/en_US.json +++ b/common/src/main/assets/lang/en_US.json @@ -290,9 +290,9 @@ "name": "Disable Spotlight", "description": "Disables the Spotlight page" }, - "startup_tab": { - "name": "Startup Tab", - "description": "Change the tab that opens on startup" + "hide_settings_gear": { + "name": "Hide Settings Gear", + "description": "Hides the SnapEnhance Settings Gear in friend feed" }, "story_viewer_override": { "name": "Story Viewer Override", 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 index ca98d6d4..021bffdc 100644 --- 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 @@ -44,5 +44,6 @@ class UserInterfaceTweaks : ConfigContainer() { ) { requireRestart() } val oldBitmojiSelfie = unique("old_bitmoji_selfie", "2d", "3d") { requireCleanCache() } val disableSpotlight = boolean("disable_spotlight") { requireRestart() } + val hideSettingsGear = boolean("hide_settings_gear") { requireRestart() } val storyViewerOverride = unique("story_viewer_override", "DISCOVER_PLAYBACK_SEEKBAR", "VERTICAL_STORY_VIEWER") { requireRestart() } } diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/SettingsGearInjector.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/SettingsGearInjector.kt index 2152ccc8..041bccbd 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/SettingsGearInjector.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/SettingsGearInjector.kt @@ -14,6 +14,7 @@ import me.rhunk.snapenhance.core.util.ktx.getStyledAttributes @SuppressLint("DiscouragedApi") class SettingsGearInjector : AbstractMenu() { override fun inject(parent: ViewGroup, view: View, viewConsumer: (View) -> Unit) { + if (context.config.userInterface.hideSettingsGear.get()) return val firstView = (view as ViewGroup).getChildAt(0) val ngsHovaHeaderSearchIconBackgroundMarginLeft = context.resources.getDimens("ngs_hova_header_search_icon_background_margin_left")