Fix detekt issues
All checks were successful
Pull Request / build (pull_request) Successful in 3m26s

This commit is contained in:
Marvin Elsen 2024-10-03 13:40:58 +02:00
parent 630d464916
commit 46af4db9f1
Signed by: marvinelsen
GPG Key ID: 820672408CC318C2

View File

@ -24,6 +24,7 @@ import kotlinx.html.ol
import kotlinx.html.stream.createHTML
import java.util.ResourceBundle
@Suppress("UnusedPrivateMember")
class DetailsController(private val model: Model, private val config: Config) {
@FXML
private lateinit var resources: ResourceBundle
@ -61,7 +62,6 @@ class DetailsController(private val model: Model, private val config: Config) {
@FXML
private lateinit var labelNoWordsFound: Label
@FXML
private fun initialize() {
initializeLabelHeadword()
@ -104,9 +104,20 @@ class DetailsController(private val model: Model, private val config: Config) {
{
val selectedEntry = model.selectedEntry.value
when (config.details.pronunciation.value!!) {
Pronunciation.PINYIN_WITH_TONE_MARKS -> selectedEntry?.pinyinWithToneMarksProperty?.value
Pronunciation.PINYIN_WITH_TONE_NUMBERS -> selectedEntry?.pinyinWithToneNumbersProperty?.value
Pronunciation.ZHUYIN -> selectedEntry?.zhuyinProperty?.value
Pronunciation.PINYIN_WITH_TONE_MARKS ->
selectedEntry
?.pinyinWithToneMarksProperty
?.value
Pronunciation.PINYIN_WITH_TONE_NUMBERS ->
selectedEntry
?.pinyinWithToneNumbersProperty
?.value
Pronunciation.ZHUYIN ->
selectedEntry
?.zhuyinProperty
?.value
}
},
config.details.pronunciation,