Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit a43aa7b

Browse files
authored
Add equatable fields so Swift can synthesize no-unavailable-conformance
1 parent 6b43780 commit a43aa7b

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

Sources/prostore/views/AppsView.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public struct AppVersion: Decodable {
111111
}
112112

113113
// Final AltApp used by the UI (includes repositoryName)
114-
public struct AltApp: Identifiable {
114+
public struct AltApp: Identifiable, Equatable {
115115
public var id: String { bundleIdentifier }
116116

117117
public let name: String
@@ -126,9 +126,23 @@ public struct AltApp: Identifiable {
126126
public let versionDate: String?
127127
public let fullDate: String?
128128
public let downloadURL: URL?
129-
public let repositoryName: String? // <-- new
129+
public let repositoryName: String?
130+
public static func == (lhs: AltApp, rhs: AltApp) -> Bool {
131+
return lhs.bundleIdentifier == rhs.bundleIdentifier &&
132+
lhs.name == rhs.name &&
133+
lhs.developerName == rhs.developerName &&
134+
lhs.subtitle == rhs.subtitle &&
135+
lhs.iconURL?.absoluteString == rhs.iconURL?.absoluteString &&
136+
lhs.localizedDescription == rhs.localizedDescription &&
137+
lhs.size == rhs.size &&
138+
lhs.versionDate == rhs.versionDate &&
139+
lhs.fullDate == rhs.fullDate &&
140+
lhs.downloadURL?.absoluteString == rhs.downloadURL?.absoluteString &&
141+
lhs.repositoryName == rhs.repositoryName
142+
}
130143
}
131144

145+
132146
// MARK: - ViewModel
133147
@MainActor
134148
final class RepoViewModel: ObservableObject {

0 commit comments

Comments
 (0)