advise Add Remove
open fun adviseAddRemove(lifetime: Lifetime, handler: (AddRemove, Int, V) -> Unit)
Content copied to clipboard
Adds a subscription to additions and removals of list elements. When a list element is updated, the handler is called twice: to report the removal of the old element and the addition of the new one.
The subscription is removed when the given lifetime expires.