Skip to content

Commit

Permalink
Apply changes from ktLintFormat
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
RBusarow authored and github-actions[bot] committed Jan 25, 2024
1 parent 51a78e5 commit 589288b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import com.squareup.sample.compose.nestedrenderings.RecursiveWorkflow.Rendering
import com.squareup.workflow1.ui.Screen
import com.squareup.workflow1.ui.ViewEnvironment
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.compose.WorkflowRendering
import com.squareup.workflow1.ui.compose.ScreenComposableFactory
import com.squareup.workflow1.ui.compose.WorkflowRendering
import com.squareup.workflow1.ui.compose.tooling.Preview

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import androidx.compose.ui.unit.dp
import com.squareup.sample.compose.textinput.TextInputWorkflow.Rendering
import com.squareup.workflow1.ui.TextController
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.compose.asMutableState
import com.squareup.workflow1.ui.compose.ScreenComposableFactory
import com.squareup.workflow1.ui.compose.asMutableState
import com.squareup.workflow1.ui.compose.tooling.Preview

@OptIn(WorkflowUiExperimentalApi::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.Screen
import com.squareup.workflow1.ui.ViewEnvironmentKey
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.compose.WorkflowRendering
import com.squareup.workflow1.ui.compose.ScreenComposableFactory
import com.squareup.workflow1.ui.compose.WorkflowRendering
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import leakcanary.DetectLeaksAfterTestSuccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.squareup.workflow1.ui.Screen
import com.squareup.workflow1.ui.ScreenViewFactory
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.compose.ScreenComposableFactory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ import com.squareup.workflow1.ui.compose.asViewFactory
)
}
return remember(composableFactoryFinder, viewEnvironmentUpdater) {
(ViewEnvironment.EMPTY +
(ScreenComposableFactoryFinder to composableFactoryFinder) +
(ScreenViewFactoryFinder to screenFactoryFinder)).let { environment ->
(
ViewEnvironment.EMPTY +
(ScreenComposableFactoryFinder to composableFactoryFinder) +
(ScreenViewFactoryFinder to screenFactoryFinder)
).let { environment ->
// Give the preview a chance to add its own elements to the ViewEnvironment.
viewEnvironmentUpdater?.let { it(environment) } ?: environment
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ public fun Screen.Preview(
placeholderModifier: Modifier = Modifier,
viewEnvironmentUpdater: ((ViewEnvironment) -> ViewEnvironment)? = null
) {
val factoryEnv = (viewEnvironmentUpdater?.invoke(ViewEnvironment.EMPTY)
?: ViewEnvironment.EMPTY)
val factoryEnv = (
viewEnvironmentUpdater?.invoke(ViewEnvironment.EMPTY)
?: ViewEnvironment.EMPTY
)

factoryEnv[ScreenComposableFactoryFinder]
.getComposableFactoryForRendering(factoryEnv, this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import com.squareup.workflow1.ui.ScreenViewHolder
import com.squareup.workflow1.ui.ViewEnvironment
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.WorkflowViewStub
import com.squareup.workflow1.ui.androidx.OnBackPressedDispatcherOwnerKey
import com.squareup.workflow1.ui.androidx.WorkflowLifecycleOwner

/**
Expand Down

0 comments on commit 589288b

Please sign in to comment.