From 5876047bda822dbe2954eefea03abac560d7b91d Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 31 Mar 2022 23:36:42 +0300 Subject: [PATCH] Resolved #6469 - solved check server connection errors on Android --- changelog.md | 2 +- core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 6e3aa85800..fa0409bc4d 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,7 @@ Changed server connection to URL-based to allow connection to uncivserver.xyz By xlenstra: - Added a unique for attacking when embarked -- Typed denmarks unique and generalized it +- Generalized Denmark's unique By HaneulCheong: - Improved city name generation diff --git a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt index 8b0351b585..ebf92736de 100644 --- a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt +++ b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt @@ -264,7 +264,6 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) { else "https://..." val multiplayerServerTextField = TextField(textToShowForMultiplayerAddress, BaseScreen.skin) multiplayerServerTextField.programmaticChangeEvents = true - multiplayerServerTextField.width = screen.stage.width / 2 val serverIpTable = Table() serverIpTable.add("Server address".toLabel().onClick { @@ -275,7 +274,7 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) { settings.save() connectionToServerButton.isEnabled = multiplayerServerTextField.text != Constants.dropboxMultiplayerServer } - serverIpTable.add(multiplayerServerTextField) + serverIpTable.add(multiplayerServerTextField).width(screen.stage.width / 2) add(serverIpTable).row() add("Reset to Dropbox".toTextButton().onClick { @@ -316,7 +315,7 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) { with(URL(url).openConnection() as HttpURLConnection) { requestMethod = method // default is GET - doOutput = true + if (method != Net.HttpMethods.GET) doOutput = true try { if (content.isNotEmpty()) {