Skip to content

Commit

Permalink
Make spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
imkunet committed Sep 19, 2024
1 parent 7a50521 commit 0e0a9aa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.TextFieldValue
import eu.kanade.tachiyomi.ui.manga.notes.MangaNotesScreenState

private const val MaxLength = 10_000
private const val MAX_LENGTH = 10_000

@Composable
fun MangaNotesTextArea(
Expand All @@ -41,12 +41,12 @@ fun MangaNotesTextArea(
) {
OutlinedTextField(
value = text,
onValueChange = { if (it.text.length <= MaxLength) text = it },
onValueChange = { if (it.text.length <= MAX_LENGTH) text = it },
modifier = Modifier
.fillMaxSize()
.focusRequester(focusRequester),
supportingText = {
val displayWarning = text.text.length > MaxLength / 10 * 9
val displayWarning = text.text.length > MAX_LENGTH / 10 * 9
if (!displayWarning) {
Text(
text = "0",
Expand All @@ -59,7 +59,7 @@ fun MangaNotesTextArea(
exit = fadeOut(),
) {
Text(
text = "${text.text.length} / $MaxLength",
text = "${text.text.length} / $MAX_LENGTH",
)
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fun MangaToolbar(
AppBar.OverflowAction(
title = stringResource(MR.strings.action_notes),
onClick = onClickNotes,
)
),
)
}
.build(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MangaNotesScreen(
navigateUp = navigator::pop,
beginEditing = { screenModel.beginEditing() },
endEditing = { screenModel.endEditing() },
onSave = { screenModel.saveText(it) }
onSave = { screenModel.saveText(it) },
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class MangaRepositoryImpl(
updateStrategy = value.updateStrategy?.let(UpdateStrategyColumnAdapter::encode),
version = value.version,
isSyncing = 0,
notes = value.notes
notes = value.notes,
)
}
}
Expand Down

0 comments on commit 0e0a9aa

Please sign in to comment.