Notification events resolving and rendering in batches (#4722)

- Use `NotiticationService.getNotifications()` function so we resolve the events in bulk.
- Added `NotifierResolverQueue` to group the notifications to resolve based on a debounce strategy.
- Batch rendering of these events as notifications.
This commit is contained in:
Jorge Martin Espinosa 2025-05-26 17:10:20 +02:00 committed by GitHub
parent f0c9f8294a
commit f455085e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 882 additions and 523 deletions

View file

@ -24,6 +24,18 @@ fun <T> value(expectedValue: T) = object : ParameterMatcher {
override fun toString(): String = "value($expectedValue)"
}
/**
* A matcher that matches a value based on a condition.
* Can be used to assert that a lambda has been called with a value that satisfies a specific condition.
*/
fun <T> matching(check: (T) -> Boolean) = object : ParameterMatcher {
override fun match(param: Any?): Boolean {
@Suppress("UNCHECKED_CAST")
return (param as? T)?.let { check(it) } ?: false
}
override fun toString(): String = "matching(condition)"
}
/**
* A matcher that matches any value.
* Can be used when we don't care about the value of a parameter.