diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/sync/SyncActivity.kt b/app/src/main/java/org/ole/planet/myplanet/ui/sync/SyncActivity.kt index ec3b5f5406..b8a8d37517 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/sync/SyncActivity.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/sync/SyncActivity.kt @@ -592,19 +592,20 @@ abstract class SyncActivity : ProcessUserDataActivity(), SyncListener, CheckVers serverAddresses.visibility = View.VISIBLE val serverList = listOf( - "🌎 planet.earth.ole.org", +// "🌎 planet.earth.ole.org", "🌎 planet.learning.ole.org", - "🌎 planet.vi.ole.org", - "πŸ‡ΈπŸ‡΄ planet.somalia.ole.org", +// "🌎 planet.vi.ole.org", +// "πŸ‡ΈπŸ‡΄ planet.somalia.ole.org", "πŸ‡¬πŸ‡Ή planet.guatemala.ole.org", - "πŸ‡¬πŸ‡Ή planet.sanpablo.ole.org", - "πŸ‡¬πŸ‡Ή planet.campo.ole.org", - "πŸ‡°πŸ‡ͺ planet.uriur.ole.org", - "πŸ‡°πŸ‡ͺ planet.ruiru.ole.org", - "πŸ‡°πŸ‡ͺ planet.embakasi.ole.org", - "πŸ‡ΊπŸ‡Έ planet.cambridge.ole.org", - "πŸ‡ΊπŸ‡Έ planet.egdirbmac.ole.org", - "πŸ‡ΊπŸ‡Έ planet.palmbay.ole.org" + "πŸ‡¬πŸ‡Ή 192.168.48.253", +// "πŸ‡¬πŸ‡Ή planet.sanpablo.ole.org", +// "πŸ‡¬πŸ‡Ή planet.campo.ole.org", +// "πŸ‡°πŸ‡ͺ planet.uriur.ole.org", +// "πŸ‡°πŸ‡ͺ planet.ruiru.ole.org", +// "πŸ‡°πŸ‡ͺ planet.embakasi.ole.org", +// "πŸ‡ΊπŸ‡Έ planet.cambridge.ole.org", +// "πŸ‡ΊπŸ‡Έ planet.egdirbmac.ole.org", +// "πŸ‡ΊπŸ‡Έ planet.palmbay.ole.org" ) val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, serverList) @@ -630,6 +631,11 @@ abstract class SyncActivity : ProcessUserDataActivity(), SyncListener, CheckVers val actualUrl = displayUrl.replace(Regex("[\\p{So}\\s]"), "") serverUrl.setText(actualUrl) serverPassword.setText(getPinForUrl(actualUrl)) + if (actualUrl == "192.168.48.253") { + editor.putString("serverProtocol", "http://").apply() + } else { + editor.putString("serverProtocol", "https://").apply() + } } override fun onNothingSelected(parent: AdapterView<*>) {} @@ -643,19 +649,20 @@ abstract class SyncActivity : ProcessUserDataActivity(), SyncListener, CheckVers private fun getPinForUrl(url: String): String { val pinMap = mapOf( - "planet.earth.ole.org" to "7379", +// "planet.earth.ole.org" to "7379", "planet.learning.ole.org" to "1983", - "planet.vi.ole.org" to "0660", - "planet.somalia.ole.org" to "5932", +// "planet.vi.ole.org" to "0660", +// "planet.somalia.ole.org" to "5932", "planet.guatemala.ole.org" to "5562", - "planet.sanpablo.ole.org" to "0948", - "planet.campo.ole.org" to "4324", - "planet.uriur.ole.org" to "4025", - "planet.ruiru.ole.org" to "8925", - "planet.embakasi.ole.org" to "2165", - "planet.cambridge.ole.org" to "1565", - "planet.egdirbmac.ole.org" to "6407", - "planet.palmbay.ole.org" to "9699" + "192.168.48.253" to "0948", +// "planet.sanpablo.ole.org" to "0948", +// "planet.campo.ole.org" to "4324", +// "planet.uriur.ole.org" to "4025", +// "planet.ruiru.ole.org" to "8925", +// "planet.embakasi.ole.org" to "2165", +// "planet.cambridge.ole.org" to "1565", +// "planet.egdirbmac.ole.org" to "6407", +// "planet.palmbay.ole.org" to "9699" ) return pinMap[url] ?: "" }