Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts ComposeView ViewCompositionStrategy to default. #1217

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.platform.ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed
import androidx.compose.ui.viewinterop.AndroidView
import androidx.lifecycle.setViewTreeLifecycleOwner
import com.squareup.workflow1.ui.Screen
Expand Down Expand Up @@ -126,7 +125,6 @@ public fun <ScreenT : Screen> ScreenComposableFactory<ScreenT>.asViewFactory():
container: ViewGroup?
): ScreenViewHolder<ScreenT> {
val view = ComposeView(context)
view.setViewCompositionStrategy(DisposeOnViewTreeLifecycleDestroyed)
return ScreenViewHolder(initialEnvironment, view) { newRendering, environment ->

// Update the state whenever a new rendering is emitted.
Expand Down
Loading