diff --git a/.swiftlint.yml b/.swiftlint.yml index 492f4ad7..bf7679ab 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -8,6 +8,15 @@ disabled_rules: - multiline_arguments - implicit_return - closure_end_indentation + - discarded_notification_center_observer # Observer intentionally lives for app lifetime + # Disable deprecated rules in favor of their renamed versions + - operator_whitespace # renamed to function_name_whitespace + - redundant_optional_initialization # renamed to implicit_optional_initialization + +opt_in_rules: + - function_name_whitespace + - implicit_optional_initialization + excluded: - Vendor - Tests Apple TV diff --git a/Model/Player/PlayerModel.swift b/Model/Player/PlayerModel.swift index 04110392..bcc653bd 100644 --- a/Model/Player/PlayerModel.swift +++ b/Model/Player/PlayerModel.swift @@ -650,7 +650,7 @@ final class PlayerModel: ObservableObject { // When switching away from AVPlayer, clear its current item to release Now Playing control #if !os(macOS) - if from == .appleAVPlayer && to == .mpv { + if from == .appleAVPlayer, to == .mpv { avPlayerBackend.avPlayer.replaceCurrentItem(with: nil) // Clear Now Playing info entirely before MPV takes over diff --git a/Shared/Navigation/AppSidebarNavigation.swift b/Shared/Navigation/AppSidebarNavigation.swift index b5a38e97..cd55aaac 100644 --- a/Shared/Navigation/AppSidebarNavigation.swift +++ b/Shared/Navigation/AppSidebarNavigation.swift @@ -15,7 +15,7 @@ struct AppSidebarNavigation: View { var body: some View { #if os(iOS) - content.introspect(.viewController, on: .iOS(.v15, .v16, .v17, .v18, .v26)) { viewController in + content.introspect(.viewController, on: .iOS(.v15, .v16, .v17, .v18, .v26)) { viewController in // workaround for an empty supplementary view on launch // the supplementary view is determined by the default selection inside the // primary view, but the primary view is not loaded so its selection is not read diff --git a/Shared/Subscriptions/FeedView.swift b/Shared/Subscriptions/FeedView.swift index e1279772..235811ee 100644 --- a/Shared/Subscriptions/FeedView.swift +++ b/Shared/Subscriptions/FeedView.swift @@ -223,6 +223,7 @@ struct FeedView: View { var header: some View { HStack(spacing: 16) { #if os(tvOS) + // swiftlint:disable:next deployment_target if #available(tvOS 17.0, *) { Menu { accountsPicker diff --git a/Shared/Videos/VideoCell.swift b/Shared/Videos/VideoCell.swift index b0fdf0eb..aad74eb4 100644 --- a/Shared/Videos/VideoCell.swift +++ b/Shared/Videos/VideoCell.swift @@ -433,9 +433,9 @@ struct VideoCell: View { private var thumbnailImage: some View { VideoCellThumbnail(video: video) - #if os(tvOS) + #if os(tvOS) .frame(minHeight: 320) - #endif + #endif .mask(RoundedRectangle(cornerRadius: thumbnailRoundingCornerRadius)) }