mirror of
https://github.com/melihaksoy/Android-Kotlin-Modulerized-CleanArchitecture.git
synced 2026-03-20 16:44:11 +01:00
Small format fixes
This commit is contained in:
@@ -102,10 +102,10 @@ internal class NetworkSource @Inject constructor(
|
||||
val url = urlSplit[0]
|
||||
val format = urlSplit[1].split(".")[1]
|
||||
|
||||
var requestedSize = DEFAULT_IMAGE_SIZE
|
||||
|
||||
if (!supportedSizes.contains(requestedSize)) {
|
||||
requestedSize = supportedSizes.last { it < requestedSize }
|
||||
val requestedSize = if (!supportedSizes.contains(DEFAULT_IMAGE_SIZE)) {
|
||||
supportedSizes.last { it < DEFAULT_IMAGE_SIZE }
|
||||
} else {
|
||||
DEFAULT_IMAGE_SIZE
|
||||
}
|
||||
|
||||
"${url}_$requestedSize.$format"
|
||||
|
||||
Reference in New Issue
Block a user