Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Walingar committed Sep 4, 2023
1 parent 96622e0 commit e6ea173
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import javax.swing.JComponent
fun ComponentDataProviderBridge(
component: JComponent,
modifier: Modifier = Modifier,
content: @Composable () -> Unit
content: @Composable () -> Unit,
) {
val rootDataProviderModifier = remember { RootDataProviderModifier() }

Expand Down Expand Up @@ -59,7 +59,7 @@ fun ComponentDataProviderBridge(
*/
@Suppress("unused")
fun Modifier.provideData(dataProvider: (dataId: String) -> Any?) = this.then(
DataProviderElement(dataProvider)
DataProviderElement(dataProvider),
)

@VisibleForTesting
Expand Down Expand Up @@ -108,4 +108,4 @@ private fun DataProviderNode.traverseDownToFocused(): DataProviderNode? {
}

return this.takeIf { hasFocus }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ProvideDataTest {
else -> null
}
}
.focusable()
.focusable(),
)
}
rule.awaitIdle()
Expand Down Expand Up @@ -66,18 +66,18 @@ class ProvideDataTest {
else -> null
}
}
.focusable()
.focusable(),
) {
Box(modifier = Modifier.testTag("non_data_provider").focusable()) {
Box(modifier = Modifier
.testTag("data_provider_item")
.provideData {
when (it) {
"data" -> "ok"
else -> null
}
}
.focusable()
Box(
modifier = Modifier
.testTag("data_provider_item")
.provideData {
when (it) {
"data" -> "ok"
else -> null
}
}.focusable(),
)
}
}
Expand All @@ -91,7 +91,6 @@ class ProvideDataTest {
assertEquals("yes", rootDataProviderModifier.dataProvider("isRoot"))
assertEquals(null, rootDataProviderModifier.dataProvider("data"))


focusManager!!.moveFocus(FocusDirection.Next)
rule.awaitIdle()

Expand Down

0 comments on commit e6ea173

Please sign in to comment.