For #22931 Only enable wallpapers on normal mode
This commit is contained in:
parent
00280d3b65
commit
cf31bc408a
|
@ -395,7 +395,7 @@ class HomeFragment : Fragment() {
|
|||
MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreateView",
|
||||
)
|
||||
|
||||
if (FeatureFlags.showWallpapers) {
|
||||
if (shouldEnableWallpaper()) {
|
||||
val wallpaperManger = requireComponents.wallpaperManager
|
||||
wallpaperManger.updateWallpaper(binding.homeLayout, wallpaperManger.currentWallpaper)
|
||||
}
|
||||
|
@ -758,7 +758,7 @@ class HomeFragment : Fragment() {
|
|||
requireComponents.reviewPromptController.promptReview(requireActivity())
|
||||
}
|
||||
|
||||
if (FeatureFlags.showWallpapers) {
|
||||
if (shouldEnableWallpaper()) {
|
||||
binding.wordmark.setOnClickListener {
|
||||
val manager = requireComponents.wallpaperManager
|
||||
manager.updateWallpaper(
|
||||
|
@ -1195,6 +1195,9 @@ class HomeFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun shouldEnableWallpaper() =
|
||||
FeatureFlags.showWallpapers && !(activity as HomeActivity).themeManager.currentTheme.isPrivate
|
||||
|
||||
companion object {
|
||||
const val ALL_NORMAL_TABS = "all_normal"
|
||||
const val ALL_PRIVATE_TABS = "all_private"
|
||||
|
|
Loading…
Reference in New Issue
Block a user