Skip to content

Commit 9bc9961

Browse files
committed
Fix filtered notifications
1 parent 0af3732 commit 9bc9961

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Packages/Models/Sources/Models/NotificationsPolicy.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public struct NotificationsPolicy: Codable, Sendable {
88
public let summary: Summary
99

1010
public struct Summary: Codable, Sendable {
11-
public let pendingRequestsCount: String
12-
public let pendingNotificationsCount: String
11+
public let pendingRequestsCount: Int
12+
public let pendingNotificationsCount: Int
1313
}
1414
}

Packages/Notifications/Sources/Notifications/NotificationsHeaderFilteredView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ struct NotificationsHeaderFilteredView: View {
1010
let filteredNotifications: NotificationsPolicy.Summary
1111

1212
var body: some View {
13-
if let count = Int(filteredNotifications.pendingNotificationsCount), count > 0 {
13+
if filteredNotifications.pendingNotificationsCount > 0 {
1414
HStack {
1515
Label("notifications.content-filter.requests.title", systemImage: "archivebox")
1616
.foregroundStyle(.secondary)
1717
Spacer()
18-
Text(filteredNotifications.pendingNotificationsCount)
18+
Text("\(filteredNotifications.pendingNotificationsCount)")
1919
.font(.footnote)
2020
.fontWeight(.semibold)
2121
.monospacedDigit()

0 commit comments

Comments
 (0)