Skip to content

Commit

Permalink
Fix name of inspectionMode
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Dec 15, 2024
1 parent c9d0185 commit b21d5d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,19 @@ data class RoborazziComposeFontScaleOption(private val fontScale: Float) :
}

@ExperimentalRoborazziApi
fun RoborazziComposeOptions.Builder.localInspectionMode(
localInspectionMode: Boolean
fun RoborazziComposeOptions.Builder.inspectionMode(
inspectionMode: Boolean
): RoborazziComposeOptions.Builder =
addOption(RoborazziComposeLocalInspectionModeOption(localInspectionMode))
addOption(RoborazziComposeInspectionModeOption(inspectionMode))


@ExperimentalRoborazziApi
data class RoborazziComposeLocalInspectionModeOption(private val localInspectionMode: Boolean) :
data class RoborazziComposeInspectionModeOption(private val inspectionMode: Boolean) :
RoborazziComposeComposableOption {
override fun configureWithComposable(
content: @Composable () -> Unit
): @Composable () -> Unit = {
CompositionLocalProvider(LocalInspectionMode provides localInspectionMode) {
CompositionLocalProvider(LocalInspectionMode provides inspectionMode) {
content()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class ComposeLambdaTest {
fontScale(2f)

/*
We don't specify `localInspectionMode` by default.
The default value for `localInspectionMode` in Compose is `false`.
We don't specify `inspectionMode` by default.
The default value for `inspectionMode` in Compose is `false`.
This is to maintain higher fidelity in tests.
If you encounter issues integrating the library, you can set `localInspectionMode` to `true`.
If you encounter issues integrating the library, you can set `inspectionMode` to `true`.
localInspectionMode(true)
inspectionMode(true)
*/

// We can also configure the activity scenario and the composable content.
Expand Down

0 comments on commit b21d5d3

Please sign in to comment.