From 2413526d70eeea2ec88fd8e354647d89cb7f3aad Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 2 Feb 2024 10:42:24 +0100 Subject: [PATCH] Style fixes --- Model/Applications/PipedAPI.swift | 3 ++- Shared/Settings/Import/ImportSettingsSheetViewModel.swift | 2 +- Shared/Views/ControlsBar.swift | 2 +- macOS/PlayerViewController.swift | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Model/Applications/PipedAPI.swift b/Model/Applications/PipedAPI.swift index c19de229..bdb23372 100644 --- a/Model/Applications/PipedAPI.swift +++ b/Model/Applications/PipedAPI.swift @@ -154,7 +154,8 @@ final class PipedAPI: Service, ObservableObject, VideosAPI { method: .post, parameters: ["username": username, "password": password], encoding: JSONEncoding.default - ).responseDecodable(of: JSON.self) { [weak self] response in + ) + .responseDecodable(of: JSON.self) { [weak self] response in guard let self else { return } diff --git a/Shared/Settings/Import/ImportSettingsSheetViewModel.swift b/Shared/Settings/Import/ImportSettingsSheetViewModel.swift index 343e59da..8a9645a5 100644 --- a/Shared/Settings/Import/ImportSettingsSheetViewModel.swift +++ b/Shared/Settings/Import/ImportSettingsSheetViewModel.swift @@ -1,7 +1,7 @@ import Foundation import SwiftUI -class ImportSettingsSheetViewModel: ObservableObject { +final class ImportSettingsSheetViewModel: ObservableObject { static let shared = ImportSettingsSheetViewModel() @Published var selectedInstances = Set() diff --git a/Shared/Views/ControlsBar.swift b/Shared/Views/ControlsBar.swift index d415ba11..d67cb40c 100644 --- a/Shared/Views/ControlsBar.swift +++ b/Shared/Views/ControlsBar.swift @@ -13,7 +13,7 @@ struct ControlsBar: View { @State private var shareURL: URL? @Binding var expansionState: ExpansionState - @State var gestureThrottle = Throttle(interval: 0.25) // swiftlint:disable:this swiftui_state_private + @State var gestureThrottle = Throttle(interval: 0.25) // swiftlint:disable:this private_swiftui_state var presentingControls = true var backgroundEnabled = true diff --git a/macOS/PlayerViewController.swift b/macOS/PlayerViewController.swift index fdffff7d..9ce7d948 100644 --- a/macOS/PlayerViewController.swift +++ b/macOS/PlayerViewController.swift @@ -16,7 +16,7 @@ final class PlayerViewController: NSViewController { return [ratio, 1.0].max()! } - override func viewDidDisappear() { + func viewDidDisappear() { super.viewDidDisappear() }