From 97dbd95f0de6882260690cf9d75d45e4aa6d9fe8 Mon Sep 17 00:00:00 2001 From: Tony <34975907+AnonymousWalker@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:29:20 -0500 Subject: [PATCH] Handle null audio device in Settings (#1196) * handle null audio device option * Update SettingsView.kt --- .../jvm/workbookapp/ui/components/drawer/SettingsView.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/components/drawer/SettingsView.kt b/jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/components/drawer/SettingsView.kt index c69e5bb5da..e727e9c3cb 100644 --- a/jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/components/drawer/SettingsView.kt +++ b/jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/components/drawer/SettingsView.kt @@ -183,7 +183,9 @@ class SettingsView : View() { buttonCell = IconComboBoxCell(FontIcon(MaterialDesign.MDI_VOLUME_HIGH)) overrideDefaultKeyEventHandler { - viewModel.updateOutputDevice(it) + it?.let { + viewModel.updateOutputDevice(it) + } } outputDeviceLoadingProperty.bind(showingProperty()) } @@ -217,7 +219,9 @@ class SettingsView : View() { buttonCell = IconComboBoxCell(FontIcon(MaterialDesign.MDI_MICROPHONE)) overrideDefaultKeyEventHandler { - viewModel.updateInputDevice(it) + it?.let { + viewModel.updateInputDevice(it) + } } inputDeviceLoadingProperty.bind(showingProperty()) }