allow hiding the Shared Theme button with a boolean
This commit is contained in:
parent
2af0b1f2c0
commit
106be9169e
2 changed files with 12 additions and 3 deletions
|
@ -73,7 +73,11 @@ class CustomizationActivity : BaseSimpleActivity() {
|
|||
runOnUiThread {
|
||||
setupThemes()
|
||||
val hideGoogleRelations = resources.getBoolean(R.bool.hide_google_relations)
|
||||
apply_to_all_holder.beVisibleIf(storedSharedTheme == null && curSelectedThemeId != THEME_AUTO && curSelectedThemeId != THEME_SYSTEM && !hideGoogleRelations)
|
||||
val hideSharedThemeButton = resources.getBoolean(R.bool.hide_shared_theme_button)
|
||||
apply_to_all_holder.beVisibleIf(
|
||||
storedSharedTheme == null && curSelectedThemeId != THEME_AUTO && curSelectedThemeId != THEME_SYSTEM
|
||||
&& !hideGoogleRelations && !hideSharedThemeButton
|
||||
)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
toast(R.string.update_thank_you)
|
||||
|
@ -94,7 +98,7 @@ class CustomizationActivity : BaseSimpleActivity() {
|
|||
updateLabelColors(textColor)
|
||||
originalAppIconColor = baseConfig.appIconColor
|
||||
|
||||
if (resources.getBoolean(R.bool.hide_google_relations)) {
|
||||
if (resources.getBoolean(R.bool.hide_google_relations) || resources.getBoolean(R.bool.hide_shared_theme_button)) {
|
||||
apply_to_all_holder.beGone()
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +226,11 @@ class CustomizationActivity : BaseSimpleActivity() {
|
|||
}
|
||||
|
||||
val hideGoogleRelations = resources.getBoolean(R.bool.hide_google_relations)
|
||||
apply_to_all_holder.beVisibleIf(curSelectedThemeId != THEME_AUTO && curSelectedThemeId != THEME_SYSTEM && curSelectedThemeId != THEME_SHARED && !hideGoogleRelations)
|
||||
val hideSharedThemeButton = resources.getBoolean(R.bool.hide_shared_theme_button)
|
||||
apply_to_all_holder.beVisibleIf(
|
||||
curSelectedThemeId != THEME_AUTO && curSelectedThemeId != THEME_SYSTEM && curSelectedThemeId != THEME_SHARED
|
||||
&& !hideGoogleRelations && !hideSharedThemeButton
|
||||
)
|
||||
updateMenuItemColors(menu, true, getCurrentStatusBarColor())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,4 +6,5 @@
|
|||
<bool name="hide_all_external_links">false</bool>
|
||||
<bool name="avoid_showing_rating_prompt">false</bool>
|
||||
<bool name="pretend_thank_you_installed">false</bool>
|
||||
<bool name="hide_shared_theme_button">false</bool>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue