(session: string)
| 417 | return index.session.unseenHasError[session] ?? false |
| 418 | }, |
| 419 | markViewed(session: string) { |
| 420 | const unseen = index.session.unseen[session] ?? empty |
| 421 | if (!unseen.length) return |
| 422 | |
| 423 | const projects = [ |
| 424 | ...new Set(unseen.flatMap((notification) => (notification.directory ? [notification.directory] : []))), |
| 425 | ] |
| 426 | batch(() => { |
| 427 | setStore("list", (n) => n.session === session && !n.viewed, "viewed", true) |
| 428 | updateUnseen("session", session, []) |
| 429 | projects.forEach((directory) => { |
| 430 | const next = (index.project.unseen[directory] ?? empty).filter( |
| 431 | (notification) => notification.session !== session, |
| 432 | ) |
| 433 | updateUnseen("project", directory, next) |
| 434 | }) |
| 435 | }) |
| 436 | }, |
| 437 | }, |
| 438 | project: { |
| 439 | all(directory: string) { |
nothing calls this directly
no test coverage detected