Create delegate rules API, extract AutoDispose handling to separate artifact
Closed this issue · 1 comments
ZacSweers commented
Right now we've hardcoded AutoDispose support directly in. We should make an API that allows for provisioning of separate handlers to extract observers.
Let's start with something simple: accept a list of handlers, first one to consume it wins, otherwise built-in implementation takes over.
We can look later at doing something more Retrofit-style with delegating/forwarding if need be.
ZacSweers commented
Simple interface:
interface DogTagChecker {
default boolean shouldDecorateWithDogTag(Observable<?> observable, Observer<?> observer) {
return false;
}
// Add overloads for all the other types
}
And make the default handling the last entry in the list.