always round progress down

This commit is contained in:
Finnley Somdahl 2023-12-05 01:11:56 -06:00
parent e26a6c647f
commit 393ab1e513

View file

@ -15,7 +15,7 @@ import kotlin.math.roundToInt
fun updateProgress(media: Media, number: String) {
if (Anilist.userid != null) {
CoroutineScope(Dispatchers.IO).launch {
val a = number.toFloatOrNull()?.roundToInt()
val a = number.toFloatOrNull()?.toInt()
if ((a ?: 0) > (media.userProgress ?: 0)) {
Anilist.mutation.editList(
media.id,