From b21f6161206810d3cfa9ff0ddbd329a1d0c2a66b Mon Sep 17 00:00:00 2001 From: Timo T Date: Sat, 9 Jul 2022 21:49:16 +0200 Subject: [PATCH] Fix Desktop multiplayer options showing a double separator (#7410) --- core/src/com/unciv/ui/options/MultiplayerTab.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/com/unciv/ui/options/MultiplayerTab.kt b/core/src/com/unciv/ui/options/MultiplayerTab.kt index fc9e9e7bb2..c43878f027 100644 --- a/core/src/com/unciv/ui/options/MultiplayerTab.kt +++ b/core/src/com/unciv/ui/options/MultiplayerTab.kt @@ -66,9 +66,14 @@ fun multiplayerTab( addSeparator(tab) - val turnCheckerSelect = addTurnCheckerOptions(tab, optionsPopup) - - addSeparator(tab) + // at the moment the notification service only exists on Android + val turnCheckerSelect: RefreshSelect? + if (Gdx.app.type != Application.ApplicationType.Android) { + turnCheckerSelect = addTurnCheckerOptions(tab, optionsPopup) + addSeparator(tab) + } else { + turnCheckerSelect = null + } addSelectAsSeparateTable(tab, SettingsSelect("Sound notification for when it's your turn in your currently open game:", createNotificationSoundOptions(), @@ -182,9 +187,6 @@ private fun addTurnCheckerOptions( tab: Table, optionsPopup: OptionsPopup ): RefreshSelect? { - // at the moment the notification service only exists on Android - if (Gdx.app.type != Application.ApplicationType.Android) return null - val settings = optionsPopup.settings optionsPopup.addCheckbox(tab, "Enable out-of-game turn notifications", settings.multiplayer::turnCheckerEnabled)