(notification: Notification)
| 293 | }) |
| 294 | |
| 295 | const append = (notification: Notification) => { |
| 296 | const list = pruneNotifications([...store.list, notification]) |
| 297 | const keep = new Set(list) |
| 298 | const removed = store.list.filter((n) => !keep.has(n)) |
| 299 | |
| 300 | batch(() => { |
| 301 | if (keep.has(notification)) appendToIndex(notification) |
| 302 | removed.forEach((n) => removeFromIndex(n)) |
| 303 | setStore("list", list) |
| 304 | }) |
| 305 | } |
| 306 | |
| 307 | const lookup = async (directory: string, sessionID?: string) => { |
| 308 | if (!sessionID) return undefined |
no test coverage detected