From 164aacc94e0e89a849491f31e018ac038309a6af Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sun, 18 Oct 2026 15:43:58 -0700 Subject: [PATCH] Fallback icon (#851) --- Sources/SecretAgent/PendingRequestsView.swift | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Sources/SecretAgent/PendingRequestsView.swift b/Sources/SecretAgent/PendingRequestsView.swift index 21f7b8b..ce13a91 100644 --- a/Sources/SecretAgent/PendingRequestsView.swift +++ b/Sources/SecretAgent/PendingRequestsView.swift @@ -21,10 +21,18 @@ struct PendingRequestsView: View { if let first = group.element.first { HStack { HStack { - Image(nsImage: .init(byReferencing: first.provenance.origin.iconURL!)) - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 50) + if let iconURL = first.provenance.origin.iconURL { + Image(nsImage: .init(byReferencing: iconURL)) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 50) + } else { + Image(systemName: "app.grid") + .resizable() + .aspectRatio(contentMode: .fit) + .fontWeight(.regular) + .frame(width: 50) + } VStack(alignment: .leading) { Text(first.provenance.origin.displayName) .font(.subheadline)