leonard-palm / compose-state-events

A new way to implement One-Time-UI-Events (former SingleLiveEvent) in a Compose world.
Apache License 2.0
177 stars 13 forks source link

Question: Why is StateEventWithContent implemented as an abstract class? #1

Closed yshrsmz closed 1 year ago

yshrsmz commented 1 year ago

Hi, thanks for your inspiring work!

One question; Why is StateEventWithContent implemented as an abstract class instead of sealed interface/class?

leonard-palm commented 1 year ago

Hi, good point, I overlooked that. I implmented StateEventWithContent as a sealed interface in v1.2.3 to enabled exaustive when statements. I don't see any reason at the moment why one would need to extend StateEventWithContent.