Hi everyone I'm trying use Event bus pattern in co...
# compose
t
Hi everyone I'm trying use Event bus pattern in compose but i can not collect event in launchEffect when data is pushed. I make similar in native android it's OK but not working in compose. Somebody can give me the reason this bug?
z
What is the bug exactly? In what way is it not working?
t
@Zach Klippenstein (he/him) [MOD] log in subscribe not show i think the block not working
z
Where is the
coroutineScope
coming from that you’re using to launch the publish? That scope might be getting cancelled by the navigateUp operation.
In general though, event busses for navigation (and most things) are bad, especially global busses, and here it also looks like you might have two sources of truth (navController and the bus), which is also bad.
1