()
| 407 | } |
| 408 | |
| 409 | #notify(): void { |
| 410 | if (this.hasListeners()) { |
| 411 | const shouldSkipCombine = this.#shouldSkipCombine() |
| 412 | const previousResult = this.#combinedResult |
| 413 | const newResult = shouldSkipCombine |
| 414 | ? previousResult |
| 415 | : this.#combineResult( |
| 416 | this.#trackResult(this.#result, this.#observerMatches), |
| 417 | this.#options?.combine, |
| 418 | this.#observerMatches.map( |
| 419 | (match) => match.defaultedQueryOptions.queryHash, |
| 420 | ), |
| 421 | ) |
| 422 | |
| 423 | if (shouldSkipCombine || previousResult !== newResult) { |
| 424 | notifyManager.batch(() => { |
| 425 | this.listeners.forEach((listener) => { |
| 426 | listener(this.#result) |
| 427 | }) |
| 428 | }) |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | type QueryObserverMatch = { |
no test coverage detected