mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-13 05:37:48 +02:00
feat(core/ui): hide settings gear option
This commit is contained in:
@ -290,9 +290,9 @@
|
|||||||
"name": "Disable Spotlight",
|
"name": "Disable Spotlight",
|
||||||
"description": "Disables the Spotlight page"
|
"description": "Disables the Spotlight page"
|
||||||
},
|
},
|
||||||
"startup_tab": {
|
"hide_settings_gear": {
|
||||||
"name": "Startup Tab",
|
"name": "Hide Settings Gear",
|
||||||
"description": "Change the tab that opens on startup"
|
"description": "Hides the SnapEnhance Settings Gear in friend feed"
|
||||||
},
|
},
|
||||||
"story_viewer_override": {
|
"story_viewer_override": {
|
||||||
"name": "Story Viewer Override",
|
"name": "Story Viewer Override",
|
||||||
|
@ -44,5 +44,6 @@ class UserInterfaceTweaks : ConfigContainer() {
|
|||||||
) { requireRestart() }
|
) { requireRestart() }
|
||||||
val oldBitmojiSelfie = unique("old_bitmoji_selfie", "2d", "3d") { requireCleanCache() }
|
val oldBitmojiSelfie = unique("old_bitmoji_selfie", "2d", "3d") { requireCleanCache() }
|
||||||
val disableSpotlight = boolean("disable_spotlight") { requireRestart() }
|
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() }
|
val storyViewerOverride = unique("story_viewer_override", "DISCOVER_PLAYBACK_SEEKBAR", "VERTICAL_STORY_VIEWER") { requireRestart() }
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import me.rhunk.snapenhance.core.util.ktx.getStyledAttributes
|
|||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
class SettingsGearInjector : AbstractMenu() {
|
class SettingsGearInjector : AbstractMenu() {
|
||||||
override fun inject(parent: ViewGroup, view: View, viewConsumer: (View) -> Unit) {
|
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 firstView = (view as ViewGroup).getChildAt(0)
|
||||||
|
|
||||||
val ngsHovaHeaderSearchIconBackgroundMarginLeft = context.resources.getDimens("ngs_hova_header_search_icon_background_margin_left")
|
val ngsHovaHeaderSearchIconBackgroundMarginLeft = context.resources.getDimens("ngs_hova_header_search_icon_background_margin_left")
|
||||||
|
Reference in New Issue
Block a user