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

Commit 8b26811

Browse files
authored
Add showCertError state to AppDetailView
Add state variable to manage certificate error display.
1 parent 2fdefcd commit 8b26811

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Sources/prostore/views/AppsDetailView.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Foundation
55
public struct AppDetailView: View {
66
let app: AltApp
77
@StateObject private var downloadManager = DownloadSignManager()
8+
@State private var showCertError = false
89
@Environment(\.dismiss) private var dismiss
910

1011
private var latestVersion: AppVersion? {
@@ -199,6 +200,10 @@ public struct AppDetailView: View {
199200
HStack {
200201
Spacer()
201202
Button(action: {
203+
if downloadManager.selectedCertificate == nil {
204+
showCertError = true
205+
return
206+
}
202207
downloadManager.downloadAndSign(app: app)
203208
}) {
204209
HStack {
@@ -293,4 +298,4 @@ public struct AppDetailView: View {
293298
.animation(.easeInOut(duration: 0.3), value: downloadManager.isProcessing)
294299
.animation(.easeInOut(duration: 0.3), value: downloadManager.showSuccess)
295300
}
296-
}
301+
}

0 commit comments

Comments
 (0)