diff --git a/PadelClub/Utils/Patcher.swift b/PadelClub/Utils/Patcher.swift index 94e4447..48ca002 100644 --- a/PadelClub/Utils/Patcher.swift +++ b/PadelClub/Utils/Patcher.swift @@ -53,6 +53,7 @@ enum PatchError: Error { enum Patch: String, CaseIterable { case cleanLogs case syncUpgrade + case updateTournaments var id: String { return "padelclub.app.patch.\(self.rawValue)" @@ -83,6 +84,7 @@ class AutomaticPatcher { switch patch { case .cleanLogs: self._cleanLogs() case .syncUpgrade: self._syncUpgrade() + case .updateTournaments: self._updateTournaments() } } @@ -128,4 +130,7 @@ class AutomaticPatcher { } } + fileprivate static func _updateTournaments() { + DataStore.shared.tournaments.addOrUpdate(contentOfs: DataStore.shared.tournaments) + } }