Skip to content

Commit

Permalink
Fucking Swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
XITRIX committed Dec 25, 2024
1 parent 9b1ecab commit 999d4f5
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension PatreonPreferencesViewModel {
}
}

class PatreonPreferencesViewModel: BaseViewModel {
class PatreonPreferencesViewModel: BaseViewModel, @unchecked Sendable {
let accountState = CurrentValueSubject<PatreonAccountState, Never>(.none)

required init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Combine
import MvvmFoundation
import SwiftUI

class PreferencesViewModel: BasePreferencesViewModel {
class PreferencesViewModel: BasePreferencesViewModel, @unchecked Sendable {
required init() {
super.init()
binding()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import LibTorrent
import MvvmFoundation
import SwiftUI

class TrackersListPreferencesViewModel: BaseViewModel, ObservableObject {
class TrackersListPreferencesViewModel: BaseViewModel, ObservableObject, @unchecked Sendable {
@Published var sorces: [TrackersListService.ListState] = []
@Published var isAutoaddingEnabled: Bool

Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Screens/Rss/Details/RssDetailsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension RssDetailsViewModel {
}
}

class RssDetailsViewModel: BaseViewModelWith<RssItemModel> {
class RssDetailsViewModel: BaseViewModelWith<RssItemModel>, @unchecked Sendable {
var rssModel: RssItemModel!
@Published var title: String = ""
@Published var downloadType: DownloadType?
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Screens/Rss/List/Cells/RssFeedCellViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension RssFeedCellViewModel {
}
}

class RssFeedCellViewModel: BaseViewModelWith<RssFeedCellViewModel.Config>, MvvmSelectableProtocol, MvvmReorderableProtocol {
class RssFeedCellViewModel: BaseViewModelWith<RssFeedCellViewModel.Config>, MvvmSelectableProtocol, MvvmReorderableProtocol, @unchecked Sendable {
var model: RssModel!
var selectAction: (() -> Void)?
var canReorder: Bool { true }
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Screens/Rss/List/RssListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Combine
import Foundation
import MvvmFoundation

class RssListViewModel: BaseCollectionViewModel {
class RssListViewModel: BaseCollectionViewModel, @unchecked Sendable {
required init() {
super.init()
setup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import AVFoundation
import UIKit

class AudioBackgroundService {
class AudioBackgroundService: @unchecked Sendable {
private var player: AVAudioPlayer?
private var backgroundTask: UIBackgroundTaskIdentifier?
private var asyncTask: Task<Void, Error>?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import CoreLocation

class LocationBackgroundService: NSObject {
class LocationBackgroundService: NSObject, @unchecked Sendable {
override init() {
super.init()
locationManager.delegate = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

#if canImport(ActivityKit)
import ActivityKit
@preconcurrency import ActivityKit
#endif

import Combine
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Services/Patreon/PatreonService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct PatreonToken: Codable {
var refreshToken: String
}

class PatreonService {
class PatreonService: @unchecked Sendable {
init() {
Task {
try await fetchCredentials()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extension PatreonService {
}
}

class PatreonAccount: Codable, Equatable {
class PatreonAccount: Codable, Equatable, @unchecked Sendable {
var identifier: String

var name: String
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Services/Patreon/Utils/PatreonWebServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import GCDWebServers

class PatreonWebServer: GCDWebServer {
class PatreonWebServer: GCDWebServer, @unchecked Sendable {
private var completion: ((String?) -> ())?

public static let shared = PatreonWebServer()
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Services/RssFeed/RssModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
import MvvmFoundation
import SWXMLHash

class RssModel: Hashable, Codable {
class RssModel: Hashable, Codable, @unchecked Sendable {
enum Error: Swift.Error {
case missingKey
case corruptedData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extension TrackersListService {
}
}

class TrackersListService {
class TrackersListService: @unchecked Sendable {
let trackerSources: CurrentValueSubject<[ListState.Source: ListState], Never>

init() {
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Services/WebServer/WebServerService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import GCDWebServers
import MvvmFoundation
import UIKit

class WebServerService: Resolvable {
class WebServerService: Resolvable, @unchecked Sendable {
init() { binding() }

@Published var isWebServerEnabled: Bool = false
Expand Down

0 comments on commit 999d4f5

Please sign in to comment.