fix issue with ios 26

sync3
Razmig Sarkissian 2 months ago
parent 147ee5c059
commit ab80e6f7d6
  1. 5
      PadelClubData/Data/AppSettings.swift
  2. 2
      PadelClubData/ViewModel/PadelRule.swift

@ -29,7 +29,6 @@ final public class AppSettings: MicroStorable {
public var nationalCup: Bool
public var dayDuration: Int?
public var dayPeriod: DayPeriod
public var weekdays: Set<Int>
public func lastDataSourceDate() -> Date? {
guard let lastDataSource else { return nil }
@ -56,7 +55,6 @@ final public class AppSettings: MicroStorable {
nationalCup = false
dayDuration = nil
dayPeriod = .all
weekdays = Set()
}
public required init() {
@ -72,7 +70,6 @@ final public class AppSettings: MicroStorable {
nationalCup = false
dayDuration = nil
dayPeriod = .all
weekdays = Set()
}
public required init(from decoder: Decoder) throws {
@ -92,7 +89,6 @@ final public class AppSettings: MicroStorable {
nationalCup = try container.decodeIfPresent(Bool.self, forKey: ._nationalCup) ?? false
dayDuration = try container.decodeIfPresent(Int.self, forKey: ._dayDuration)
dayPeriod = try container.decodeIfPresent(DayPeriod.self, forKey: ._dayPeriod) ?? .all
weekdays = try container.decodeIfPresent(Set<Int>.self, forKey: ._weekdays) ?? Set()
}
enum CodingKeys: String, CodingKey {
@ -111,6 +107,5 @@ final public class AppSettings: MicroStorable {
case _nationalCup = "nationalCup"
case _dayDuration = "dayDuration"
case _dayPeriod = "dayPeriod"
case _weekdays = "weekdays"
}
}

@ -25,7 +25,7 @@ enum RankSource: Hashable {
}
}
public protocol TournamentBuildHolder: Identifiable {
public protocol TournamentBuildHolder: Identifiable, Hashable, Equatable {
var id: String { get }
var category: TournamentCategory { get }
var level: TournamentLevel { get }

Loading…
Cancel
Save