Author: Adam Evyčędo <git@apiote.xyz>
fix continue button in server choosing
%!v(PANIC=String method: strings: negative Repeat count)
diff --git a/app/build.gradle b/app/build.gradle index 472d072832920aa455a25e1685457cdbcc7755f6..624cf2e7881aa4a9481a25c9aa233fcb38f9127a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,8 +30,8 @@ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { - sourceCompatibility = 17 - targetCompatibility = 17 + sourceCompatibility = 18 + targetCompatibility = 18 coreLibraryDesugaringEnabled true } buildFeatures { diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/settings/ServerChooserActivity.kt b/app/src/main/java/xyz/apiote/bimba/czwek/settings/ServerChooserActivity.kt index d1d96616c5998e2ed5f21c1da8719658f57fe9b6..7eeea11e0764d396d27c032a8d9fa211e203a82b 100644 --- a/app/src/main/java/xyz/apiote/bimba/czwek/settings/ServerChooserActivity.kt +++ b/app/src/main/java/xyz/apiote/bimba/czwek/settings/ServerChooserActivity.kt @@ -152,25 +152,22 @@ showDialog(R.string.error, R.string.error_traffic_spec, R.drawable.error_server, null) return@launch } - if (isSimple) { - updateServer(bimba.servers[0]["url"]!!) - moveOn(bimba, true) + if (preferences.getBoolean("shibboleet", false)) { + val validServers = bimba.servers.filter { !it.getOrDefault("url", null).isNullOrBlank() } + val servers = validServers.toTypedArray() + MaterialAlertDialogBuilder(this@ServerChooserActivity) + .setTitle(R.string.choose_server) + .setItems(servers.map { it["description"] }.toTypedArray()) { _, i -> + updateServer(servers[i]["url"].toString()) + moveOn(bimba, false) + } + .show() return@launch } - if (preferences.getBoolean("shibboleet", false)) { - val validServers = bimba.servers.filter { !it.getOrDefault("url", null).isNullOrBlank() } - if (validServers.size > 1) { - val servers = validServers.toTypedArray() - MaterialAlertDialogBuilder(this@ServerChooserActivity) - .setTitle(R.string.choose_server) - .setItems(servers.map { it["description"] }.toTypedArray()) { _, i -> - updateServer(servers[i]["url"].toString()) - moveOn(bimba, false) - } - .show() - } - } + updateServer(bimba.servers[0]["url"]!!) + moveOn(bimba, isSimple) + return@launch } } diff --git a/fruchtfleisch/build.gradle b/fruchtfleisch/build.gradle index 730e890c34aca32c1cf7c79d430c86a9f204929a..aaf4d52189cd87072a7cdef5902538afee6fcb81 100644 --- a/fruchtfleisch/build.gradle +++ b/fruchtfleisch/build.gradle @@ -7,6 +7,6 @@ dependencies { //implementation 'org.jetbrains.kotlin:kotlin-reflect:1.8.10' } java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_18 + targetCompatibility = JavaVersion.VERSION_18 } \ No newline at end of file