fix: 过滤已关闭/已解决 bug 的变更通知

This commit is contained in:
tigerenwork 2026-07-05 20:31:25 +08:00
parent 55d8b50f1d
commit 239403e75c
1 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,11 @@ final class NotificationService: NSObject, UNUserNotificationCenterDelegate {
guard isAuthorized else { return }
let significant = changes
.filter { $0.type == .newBug || $0.type == .priorityChanged }
.filter { change in
guard change.type == .newBug || change.type == .priorityChanged else { return false }
// Skip activity toasts for bugs that are already done.
return change.bug.status != .resolved && change.bug.status != .closed
}
.prefix(3)
for change in significant {