Skip to content

Commit

Permalink
[Fixed] Crash due to incorrect number parsing (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhPatange committed Nov 13, 2021
1 parent 5c3233f commit 0edf351
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/kpstv/yts/vpn/db/VPNRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class VPNRepository @Inject constructor(
return local
}
val network = fetchFromNetwork()
val sorted = network.sortedByDescending { it.speed.toFloat() }.subList(0, minOf(3, network.size)).map {
val sorted = network.sortedByDescending { it.speed.replace(",", "").toFloat() }.subList(0, minOf(3, network.size)).map {
it.copy(premium = true)
}.union(network).distinctBy { it.ip }
vpnDao.insertAll(sorted)
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/item_download.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
android:textSize="12sp" />

<Button
android:foregroundTint="?colorPrimary"
android:id="@+id/item_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/AndroidConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ object AndroidConfig {
const val BUILD_TOOLS_VERSION = "29.0.3"

// TODO: Always change version code & name during release
const val VERSION_CODE = 14
const val VERSION_NAME = "2.0.2"
const val VERSION_CODE = 15
const val VERSION_NAME = "2.0.3"

const val ID = "com.kpstv.yts"
// const val TEST_INSTRUMENTATION_RUNNER = "android.support.test.runner.AndroidJUnitRunner"
Expand Down

0 comments on commit 0edf351

Please sign in to comment.