fix thread count can't be set to 1 (#375)

This commit is contained in:
AmirHossein Abdolmotallebi 2025-01-19 22:41:42 +03:30 committed by GitHub
parent f627d9064c
commit e16055941a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -283,7 +283,7 @@ class AddSingleDownloadComponent(
it ?: 0
},
unMap = {
it.takeIf { it > 1 }
it.takeIf { it >= 1 }
}
),
range = 0..ThreadCountLimitation.MAX_ALLOWED_THREAD_COUNT,

View File

@ -196,7 +196,7 @@ class EditDownloadState(
},
unMap = {
copy(
preferredConnectionCount = it.takeIf { it > 1 }
preferredConnectionCount = it.takeIf { it >= 1 }
)
}
),