Remove text limit of manga notes (#3410)
This commit is contained in:
@@ -18,6 +18,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
|||||||
### Changed
|
### Changed
|
||||||
- Change all reference of extension repo to extension store ([@AntsyLich](https://github.com/AntsyLich)) ([#3349](https://github.com/mihonapp/mihon/pull/3349))
|
- Change all reference of extension repo to extension store ([@AntsyLich](https://github.com/AntsyLich)) ([#3349](https://github.com/mihonapp/mihon/pull/3349))
|
||||||
- Change the term "Obsolete" to "Orphaned" for extensions ([@AntsyLich](https://github.com/AntsyLich)) ([#3383](https://github.com/mihonapp/mihon/pull/3383))
|
- Change the term "Obsolete" to "Orphaned" for extensions ([@AntsyLich](https://github.com/AntsyLich)) ([#3383](https://github.com/mihonapp/mihon/pull/3383))
|
||||||
|
- Remove text limit of manga notes ([@AntsyLich](https://github.com/AntsyLich)) ([#3410](https://github.com/mihonapp/mihon/pull/3410))
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Add missing `outlineVariant` color to Nord theme ([@CompileConnected](https://github.com/CompileConnected)) ([#3184](https://github.com/mihonapp/mihon/pull/3184))
|
- Add missing `outlineVariant` color to Nord theme ([@CompileConnected](https://github.com/CompileConnected)) ([#3184](https://github.com/mihonapp/mihon/pull/3184))
|
||||||
|
|||||||
@@ -55,9 +55,6 @@ import tachiyomi.presentation.core.components.material.padding
|
|||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
import kotlin.time.Duration.Companion.seconds
|
import kotlin.time.Duration.Companion.seconds
|
||||||
|
|
||||||
private const val MAX_LENGTH = 250
|
|
||||||
private const val MAX_LENGTH_WARN = MAX_LENGTH * 0.9
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MangaNotesTextArea(
|
fun MangaNotesTextArea(
|
||||||
state: MangaNotesScreen.State,
|
state: MangaNotesScreen.State,
|
||||||
@@ -102,7 +99,6 @@ fun MangaNotesTextArea(
|
|||||||
RichTextEditor(
|
RichTextEditor(
|
||||||
state = richTextState,
|
state = richTextState,
|
||||||
textStyle = MaterialTheme.typography.bodyLarge,
|
textStyle = MaterialTheme.typography.bodyLarge,
|
||||||
maxLength = MAX_LENGTH,
|
|
||||||
placeholder = {
|
placeholder = {
|
||||||
Text(text = stringResource(MR.strings.notes_placeholder))
|
Text(text = stringResource(MR.strings.notes_placeholder))
|
||||||
},
|
},
|
||||||
@@ -182,12 +178,7 @@ fun MangaNotesTextArea(
|
|||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = (MAX_LENGTH - textLength).toString(),
|
text = textLength.toString(),
|
||||||
color = if (textLength > MAX_LENGTH_WARN) {
|
|
||||||
MaterialTheme.colorScheme.error
|
|
||||||
} else {
|
|
||||||
Color.Unspecified
|
|
||||||
},
|
|
||||||
modifier = Modifier.padding(MaterialTheme.padding.extraSmall),
|
modifier = Modifier.padding(MaterialTheme.padding.extraSmall),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user