From bfba7c36e63e9c3df4c91c978280c01d1c7c0e34 Mon Sep 17 00:00:00 2001 From: SPRAVEDLIVO Date: Wed, 24 Mar 2021 19:22:42 +0300 Subject: [PATCH] fix --- src/main/kotlin/rat/poison/RatPoison.kt | 2 +- src/main/kotlin/rat/poison/ui/tabs/ConfigsTab.kt | 4 +++- src/main/kotlin/rat/poison/utils/URL.kt | 2 +- version.txt | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/rat/poison/RatPoison.kt b/src/main/kotlin/rat/poison/RatPoison.kt index 8263ae02..87965641 100644 --- a/src/main/kotlin/rat/poison/RatPoison.kt +++ b/src/main/kotlin/rat/poison/RatPoison.kt @@ -48,7 +48,7 @@ data class sWeapon(var tSkinID: Int, var tStatTrak: Int, var tWear: Float, var t const val TITLE = "RatPoison" const val BRANCH = "Beta" const val F_VERSION = "1.8" -const val M_VERSION = "1.8.5.3" +const val M_VERSION = "1.8.5.4" var LOADED_CONFIG = "DEFAULT" var oWeaponSize = oWeapon::class.java.declaredFields.size diff --git a/src/main/kotlin/rat/poison/ui/tabs/ConfigsTab.kt b/src/main/kotlin/rat/poison/ui/tabs/ConfigsTab.kt index 85fe525f..3034c465 100644 --- a/src/main/kotlin/rat/poison/ui/tabs/ConfigsTab.kt +++ b/src/main/kotlin/rat/poison/ui/tabs/ConfigsTab.kt @@ -242,9 +242,11 @@ class ConfigsTab : Tab(false, false) { val tmpSelection = cloudConfigListAdapter.selection if (tmpSelection.size > 0) { val cfgName = tmpSelection[0] - val text = safeUrlRead("https://ratpoison.dimden.dev/", cfgName) + val text = safeUrlRead("https://ratpoison.dimden.dev/api/configs/", cfgName) + if (text == "") return@changed true saveCFG(cfgName, text) } + true } displayCloudConfigs.changed { _, _ -> shouldRefresh = displayCloudConfigs.isChecked; updateCloudConfigsList() } diff --git a/src/main/kotlin/rat/poison/utils/URL.kt b/src/main/kotlin/rat/poison/utils/URL.kt index 8c3802ba..b960feda 100644 --- a/src/main/kotlin/rat/poison/utils/URL.kt +++ b/src/main/kotlin/rat/poison/utils/URL.kt @@ -10,7 +10,7 @@ fun safeUrlRead(vararg fromParts: String): String { var tmpUrl = "" var ret = "" fromParts.forEachIndexed { index, s -> - tmpUrl += if (index > 1) { + tmpUrl += if (index > 0) { encodeUrl(s) } else { s diff --git a/version.txt b/version.txt index 100da68a..086cbd40 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -1.8.5.3 +1.8.5.4 beta