mirror of
https://github.com/yattee/yattee.git
synced 2026-01-08 21:02:33 +00:00
Fix SwiftFormat and SwiftLint issues
- Fix indentation in AppSidebarNavigation, VideoCell - Replace && with comma in PlayerModel condition - Add SwiftLint suppression for necessary tvOS 17.0 availability check - Update SwiftLint config to use renamed rules and disable false positives
This commit is contained in:
@@ -8,6 +8,15 @@ disabled_rules:
|
|||||||
- multiline_arguments
|
- multiline_arguments
|
||||||
- implicit_return
|
- implicit_return
|
||||||
- closure_end_indentation
|
- 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:
|
excluded:
|
||||||
- Vendor
|
- Vendor
|
||||||
- Tests Apple TV
|
- Tests Apple TV
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
|
|
||||||
// When switching away from AVPlayer, clear its current item to release Now Playing control
|
// When switching away from AVPlayer, clear its current item to release Now Playing control
|
||||||
#if !os(macOS)
|
#if !os(macOS)
|
||||||
if from == .appleAVPlayer && to == .mpv {
|
if from == .appleAVPlayer, to == .mpv {
|
||||||
avPlayerBackend.avPlayer.replaceCurrentItem(with: nil)
|
avPlayerBackend.avPlayer.replaceCurrentItem(with: nil)
|
||||||
|
|
||||||
// Clear Now Playing info entirely before MPV takes over
|
// Clear Now Playing info entirely before MPV takes over
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ struct FeedView: View {
|
|||||||
var header: some View {
|
var header: some View {
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
|
// swiftlint:disable:next deployment_target
|
||||||
if #available(tvOS 17.0, *) {
|
if #available(tvOS 17.0, *) {
|
||||||
Menu {
|
Menu {
|
||||||
accountsPicker
|
accountsPicker
|
||||||
|
|||||||
Reference in New Issue
Block a user