https://kotlinlang.org logo
#android
Title
# android
o

Olenyov Kirill

03/05/2020, 9:46 PM
Hi, does anybody know about some equivalent for hasSubscribers() method in ConflatedBroadcastChannel? I want to implement Repository pattern with updateIfNeeded() method and I need to know if there are real subscribers(views) to my repo..
z

Zach Klippenstein (he/him) [MOD]

03/06/2020, 1:25 AM
There is none afaik, but you could write a Flow operator that does this
o

Olenyov Kirill

03/06/2020, 6:30 AM
Which operator?
z

Zach Klippenstein (he/him) [MOD]

03/06/2020, 3:08 PM
None currently exists, but I think you could write one to track subscribers and expose this information.