Quentin Bandera 129eb135f1
Some checks are pending
gitea-openium/resgen.swift/pipeline/pr-master Build started...
DEVTOOLS-185 Remplacer le json en dur des images resgen
2024-04-19 17:02:00 +02:00

33 lines
747 B
Swift

//
// ImageContent.swift
//
//
// Created by Quentin Bandera on 19/04/2024.
//
import Foundation
struct AssetContent: Codable, Equatable {
let images: [AssetImageDescription]
let info: AssetInfo
static func == (lhs: AssetContent, rhs: AssetContent) -> Bool {
guard lhs.images.count == rhs.images.count else { return false }
let lhsImages = lhs.images.sorted(by: { $0.scale < $1.scale })
let rhsImages = rhs.images.sorted(by: { $0.scale < $1.scale })
return lhsImages == rhsImages
}
}
struct AssetImageDescription: Codable, Equatable {
let idiom: String
let scale: String
let filename: String
}
struct AssetInfo: Codable, Equatable {
let version: Int
let author: String
}