Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Custom Playback Settings] Hide segmented for local Files #2336

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions podcasts/EffectsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
}

Expand Down