mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-13 22:12:49 +01:00
Make spotless
This commit is contained in:
parent
7a50521ad7
commit
0e0a9aac5b
@ -22,7 +22,7 @@ import androidx.compose.ui.text.TextRange
|
|||||||
import androidx.compose.ui.text.input.TextFieldValue
|
import androidx.compose.ui.text.input.TextFieldValue
|
||||||
import eu.kanade.tachiyomi.ui.manga.notes.MangaNotesScreenState
|
import eu.kanade.tachiyomi.ui.manga.notes.MangaNotesScreenState
|
||||||
|
|
||||||
private const val MaxLength = 10_000
|
private const val MAX_LENGTH = 10_000
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MangaNotesTextArea(
|
fun MangaNotesTextArea(
|
||||||
@ -41,12 +41,12 @@ fun MangaNotesTextArea(
|
|||||||
) {
|
) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = text,
|
value = text,
|
||||||
onValueChange = { if (it.text.length <= MaxLength) text = it },
|
onValueChange = { if (it.text.length <= MAX_LENGTH) text = it },
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.focusRequester(focusRequester),
|
.focusRequester(focusRequester),
|
||||||
supportingText = {
|
supportingText = {
|
||||||
val displayWarning = text.text.length > MaxLength / 10 * 9
|
val displayWarning = text.text.length > MAX_LENGTH / 10 * 9
|
||||||
if (!displayWarning) {
|
if (!displayWarning) {
|
||||||
Text(
|
Text(
|
||||||
text = "0",
|
text = "0",
|
||||||
@ -59,7 +59,7 @@ fun MangaNotesTextArea(
|
|||||||
exit = fadeOut(),
|
exit = fadeOut(),
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "${text.text.length} / $MaxLength",
|
text = "${text.text.length} / $MAX_LENGTH",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -155,7 +155,7 @@ fun MangaToolbar(
|
|||||||
AppBar.OverflowAction(
|
AppBar.OverflowAction(
|
||||||
title = stringResource(MR.strings.action_notes),
|
title = stringResource(MR.strings.action_notes),
|
||||||
onClick = onClickNotes,
|
onClick = onClickNotes,
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.build(),
|
.build(),
|
||||||
|
@ -51,7 +51,7 @@ class MangaNotesScreen(
|
|||||||
navigateUp = navigator::pop,
|
navigateUp = navigator::pop,
|
||||||
beginEditing = { screenModel.beginEditing() },
|
beginEditing = { screenModel.beginEditing() },
|
||||||
endEditing = { screenModel.endEditing() },
|
endEditing = { screenModel.endEditing() },
|
||||||
onSave = { screenModel.saveText(it) }
|
onSave = { screenModel.saveText(it) },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ class MangaRepositoryImpl(
|
|||||||
updateStrategy = value.updateStrategy?.let(UpdateStrategyColumnAdapter::encode),
|
updateStrategy = value.updateStrategy?.let(UpdateStrategyColumnAdapter::encode),
|
||||||
version = value.version,
|
version = value.version,
|
||||||
isSyncing = 0,
|
isSyncing = 0,
|
||||||
notes = value.notes
|
notes = value.notes,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user