Skip to content

Commit

Permalink
Change Modifier.textFieldScroll to an expect function.
Browse files Browse the repository at this point in the history
Needed to allow a different implementation for uikit in Compose Multiplatform.

Test: None needed.
Change-Id: I0807d50c8f2c50232f74ba2141af879b3992950e
  • Loading branch information
m-sasha committed Nov 11, 2024
1 parent 9ea3986 commit 4c95b62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 The Android Open Source Project
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,9 +32,10 @@ internal actual fun Modifier.textFieldScroll(
textFieldValue: TextFieldValue,
visualTransformation: VisualTransformation,
textLayoutResultProvider: () -> TextLayoutResultProxy?
): Modifier = defaultTextFieldScroll(
scrollerPosition,
textFieldValue,
visualTransformation,
textLayoutResultProvider,
)
): Modifier =
defaultTextFieldScroll(
scrollerPosition,
textFieldValue,
visualTransformation,
textLayoutResultProvider,
)
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ internal fun Modifier.textFieldScrollable(
}

// Layout
// Expect/actual is needed due to a different implementation in uikit
internal expect fun Modifier.textFieldScroll(
scrollerPosition: TextFieldScrollerPosition,
textFieldValue: TextFieldValue,
Expand Down

0 comments on commit 4c95b62

Please sign in to comment.