fix: 过滤已关闭/已解决 bug 的变更通知
This commit is contained in:
parent
55d8b50f1d
commit
239403e75c
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue