Skip to content

Commit

Permalink
Merge pull request #716 from arkivanov/main-thread-checks
Browse files Browse the repository at this point in the history
Added main thread check to children function
  • Loading branch information
arkivanov authored May 28, 2024
2 parents b133dee + 19d8987 commit 6154b18
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ fun <Ctx : GenericComponentContext<Ctx>, C : Any, T : Any, E : Any, N : NavState
backTransformer: (state: N) -> (() -> N)? = { null },
childFactory: (configuration: C, componentContext: Ctx) -> T,
): Value<S> {
checkMainThread()

val mainBackHandler = backHandler.child()
val relay = Relay<NavEvent<E>>()
val cancellation = source.subscribe { relay.accept(NavEvent.Event(it)) }
Expand Down

0 comments on commit 6154b18

Please sign in to comment.