Skip to content

Commit bb2872e

Browse files
committed
feature #511 Add scroll state.
1 parent 1bb2ef7 commit bb2872e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

editor/src/main/java/jp/toastkid/editor/view/EditorTabViewModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class EditorTabViewModel {
4646

4747
private val lineCount = mutableIntStateOf(0)
4848

49+
private val verticalScrollState = ScrollState(0)
50+
4951
private val lineNumberScrollState = ScrollState(0)
5052

5153
private val focusRequester = FocusRequester()
@@ -105,6 +107,8 @@ class EditorTabViewModel {
105107
lineNumbers.value = list
106108
}
107109

110+
fun verticalScrollState() = verticalScrollState
111+
108112
fun lineNumberScrollState() = lineNumberScrollState
109113

110114
fun onClickLineNumber(it: Int) {

0 commit comments

Comments
 (0)