mirror of
https://github.com/mihonapp/mihon.git
synced 2025-01-05 15:57:12 +01:00
Make cursor jump to end by default
This commit is contained in:
parent
5a42eb0d5f
commit
44cffcfcf7
@ -15,6 +15,8 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.focus.FocusRequester
|
import androidx.compose.ui.focus.FocusRequester
|
||||||
import androidx.compose.ui.focus.focusRequester
|
import androidx.compose.ui.focus.focusRequester
|
||||||
|
import androidx.compose.ui.text.TextRange
|
||||||
|
import androidx.compose.ui.text.input.TextFieldValue
|
||||||
import eu.kanade.tachiyomi.ui.manga.notes.MangaNotesScreenState
|
import eu.kanade.tachiyomi.ui.manga.notes.MangaNotesScreenState
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -23,7 +25,9 @@ fun MangaNotesTextArea(
|
|||||||
onSave: (String) -> Unit,
|
onSave: (String) -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
var text by remember { mutableStateOf(state.notes.orEmpty()) }
|
var text by remember {
|
||||||
|
mutableStateOf(TextFieldValue(state.notes.orEmpty(), TextRange(Int.MAX_VALUE)))
|
||||||
|
}
|
||||||
val focusRequester = remember { FocusRequester() }
|
val focusRequester = remember { FocusRequester() }
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
@ -47,7 +51,7 @@ fun MangaNotesTextArea(
|
|||||||
|
|
||||||
DisposableEffect(Unit) {
|
DisposableEffect(Unit) {
|
||||||
onDispose {
|
onDispose {
|
||||||
onSave(text)
|
onSave(text.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user