mirror of
https://github.com/melihaksoy/Android-Kotlin-Modulerized-CleanArchitecture.git
synced 2026-03-27 20:01:30 +01:00
Small format fixes
This commit is contained in:
@@ -35,7 +35,7 @@ abstract class BasePagingFactory<T> : DataSource.Factory<Int, T>() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalidating the [currentSource]
|
* Invalidating the [currentSource]
|
||||||
* by calling [be.mediahuis.core.base.paging.BasePagingDataSource.invalidate]
|
* by calling [BasePagingDataSource.invalidate]
|
||||||
*/
|
*/
|
||||||
fun invalidateDataSource() = currentSource.value?.invalidate()
|
fun invalidateDataSource() = currentSource.value?.invalidate()
|
||||||
// endregion
|
// endregion
|
||||||
|
|||||||
@@ -102,10 +102,10 @@ internal class NetworkSource @Inject constructor(
|
|||||||
val url = urlSplit[0]
|
val url = urlSplit[0]
|
||||||
val format = urlSplit[1].split(".")[1]
|
val format = urlSplit[1].split(".")[1]
|
||||||
|
|
||||||
var requestedSize = DEFAULT_IMAGE_SIZE
|
val requestedSize = if (!supportedSizes.contains(DEFAULT_IMAGE_SIZE)) {
|
||||||
|
supportedSizes.last { it < DEFAULT_IMAGE_SIZE }
|
||||||
if (!supportedSizes.contains(requestedSize)) {
|
} else {
|
||||||
requestedSize = supportedSizes.last { it < requestedSize }
|
DEFAULT_IMAGE_SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
"${url}_$requestedSize.$format"
|
"${url}_$requestedSize.$format"
|
||||||
|
|||||||
Reference in New Issue
Block a user