From af3a291536fd86e9b563dd38cab0741dd41c6eea Mon Sep 17 00:00:00 2001 From: Marvin Elsen Date: Thu, 10 Oct 2024 22:38:58 +0200 Subject: [PATCH] Fix some detekt issues --- .../com/marvinelsen/willow/ui/cells/EntryCellFactory.kt | 8 ++++++-- .../marvinelsen/willow/ui/dialogs/PreferencesDialog.kt | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt b/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt index 3683989..5634aaf 100644 --- a/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt +++ b/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt @@ -115,8 +115,12 @@ internal class EntryCell(private val resources: ResourceBundle, private val conf separator = " / " ) { it.joinToString(separator = "; ") } - entry.crossStraitsDefinitions.isNotEmpty() -> entry.crossStraitsDefinitions.joinToString(separator = " / ") { it.definition } - entry.moedictDefinitions.isNotEmpty() -> entry.moedictDefinitions.joinToString(separator = " / ") { it.definition } + entry.crossStraitsDefinitions.isNotEmpty() -> entry.crossStraitsDefinitions.joinToString( + separator = " / " + ) { it.definition } + entry.moedictDefinitions.isNotEmpty() -> entry.moedictDefinitions.joinToString( + separator = " / " + ) { it.definition } else -> error("No definition for entry") } labelDefinition.text = definition diff --git a/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt b/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt index 0b19020..14abb07 100644 --- a/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt +++ b/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt @@ -37,8 +37,8 @@ class PreferencesDialog( } val root = fxmlLoader.load(javaClass.getResourceAsStream("/fxml/dialogs/preferences.fxml")) as DialogPane - root.prefHeightProperty().bind(dialogPane.scene.heightProperty()); - root.prefWidthProperty().bind(dialogPane.scene.widthProperty()); + root.prefHeightProperty().bind(dialogPane.scene.heightProperty()) + root.prefWidthProperty().bind(dialogPane.scene.widthProperty()) dialogPane = root title = "Settings"