[All Platforms] 2.1.0 - Sync Optimizations
All checks were successful
Ascently - Sync Deploy / build-and-push (push) Successful in 2m31s
Ascently - Docs Deploy / build-and-push (push) Successful in 3m30s

This commit is contained in:
2025-10-15 18:17:19 -06:00
parent 01d85a4add
commit 23de8a6fc6
32 changed files with 1538 additions and 409 deletions

View File

@@ -55,7 +55,6 @@ struct BackupGym: Codable {
let createdAt: String
let updatedAt: String
/// Initialize from native iOS Gym model
init(from gym: Gym) {
self.id = gym.id.uuidString
self.name = gym.name
@@ -71,7 +70,6 @@ struct BackupGym: Codable {
self.updatedAt = formatter.string(from: gym.updatedAt)
}
/// Initialize with explicit parameters for import
init(
id: String,
name: String,
@@ -94,7 +92,6 @@ struct BackupGym: Codable {
self.updatedAt = updatedAt
}
/// Convert to native iOS Gym model
func toGym() throws -> Gym {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
@@ -137,7 +134,6 @@ struct BackupProblem: Codable {
let createdAt: String
let updatedAt: String
/// Initialize from native iOS Problem model
init(from problem: Problem) {
self.id = problem.id.uuidString
self.gymId = problem.gymId.uuidString
@@ -158,7 +154,6 @@ struct BackupProblem: Codable {
self.updatedAt = formatter.string(from: problem.updatedAt)
}
/// Initialize with explicit parameters for import
init(
id: String,
gymId: String,
@@ -191,7 +186,6 @@ struct BackupProblem: Codable {
self.updatedAt = updatedAt
}
/// Convert to native iOS Problem model
func toProblem() throws -> Problem {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
@@ -224,7 +218,6 @@ struct BackupProblem: Codable {
)
}
/// Create a copy with updated image paths for import processing
func withUpdatedImagePaths(_ newImagePaths: [String]) -> BackupProblem {
return BackupProblem(
id: self.id,
@@ -258,7 +251,6 @@ struct BackupClimbSession: Codable {
let createdAt: String
let updatedAt: String
/// Initialize from native iOS ClimbSession model
init(from session: ClimbSession) {
self.id = session.id.uuidString
self.gymId = session.gymId.uuidString
@@ -275,7 +267,6 @@ struct BackupClimbSession: Codable {
self.updatedAt = formatter.string(from: session.updatedAt)
}
/// Initialize with explicit parameters for import
init(
id: String,
gymId: String,
@@ -300,7 +291,6 @@ struct BackupClimbSession: Codable {
self.updatedAt = updatedAt
}
/// Convert to native iOS ClimbSession model
func toClimbSession() throws -> ClimbSession {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
@@ -347,7 +337,6 @@ struct BackupAttempt: Codable {
let createdAt: String
let updatedAt: String?
/// Initialize from native iOS Attempt model
init(from attempt: Attempt) {
self.id = attempt.id.uuidString
self.sessionId = attempt.sessionId.uuidString
@@ -365,7 +354,6 @@ struct BackupAttempt: Codable {
self.updatedAt = formatter.string(from: attempt.updatedAt)
}
/// Initialize with explicit parameters for import
init(
id: String,
sessionId: String,
@@ -392,7 +380,6 @@ struct BackupAttempt: Codable {
self.updatedAt = updatedAt
}
/// Convert to native iOS Attempt model
func toAttempt() throws -> Attempt {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]