Quentin Bandera c8cfe82109
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
gitea-openium/resgen.swift/pipeline/pr-master There was a failure building this commit
DEVTOOLS-185 Remplacer le json en dur des images resgen
2024-04-19 12:17:01 +02:00

37 lines
845 B
Swift

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