From 24bc901c62a47c85d6ebf062594ac7c6077919df Mon Sep 17 00:00:00 2001 From: Daniele Bogo Date: Fri, 25 Oct 2024 12:36:01 +0200 Subject: [PATCH] Hide settings in local file effects view --- podcasts/EffectsViewController.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/podcasts/EffectsViewController.swift b/podcasts/EffectsViewController.swift index 1c551382b..614403c48 100644 --- a/podcasts/EffectsViewController.swift +++ b/podcasts/EffectsViewController.swift @@ -138,7 +138,9 @@ class EffectsViewController: SimpleNotificationsViewController { @IBOutlet weak var playbackSettingsSegmentedControl: UISegmentedControl! { didSet { - playbackSettingsSegmentedControl.isHidden = !FeatureFlag.customPlaybackSettings.enabled + let isUserEpisode = PlaybackManager.shared.currentEpisode()?.isUserEpisode == true + let shouldDisplaySegmentedControl = FeatureFlag.customPlaybackSettings.enabled && !isUserEpisode + playbackSettingsSegmentedControl.isHidden = !shouldDisplaySegmentedControl playbackSettingsSegmentedControl.setTitle(L10n.playbackEffectAllPodcasts, forSegmentAt: 0) playbackSettingsSegmentedControl.setTitle(L10n.playbackEffectThisPodcast, forSegmentAt: 1) @@ -152,7 +154,8 @@ class EffectsViewController: SimpleNotificationsViewController { @IBOutlet weak var speedControlTopConstraint: NSLayoutConstraint! { didSet { - speedControlTopConstraint.isActive = FeatureFlag.customPlaybackSettings.enabled + let isUserEpisode = PlaybackManager.shared.currentEpisode()?.isUserEpisode == true + speedControlTopConstraint.isActive = FeatureFlag.customPlaybackSettings.enabled && !isUserEpisode } }