mirror of
https://github.com/melihaksoy/Android-Kotlin-Modulerized-CleanArchitecture.git
synced 2026-01-11 20:00:32 +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]
|
||||
* by calling [be.mediahuis.core.base.paging.BasePagingDataSource.invalidate]
|
||||
* by calling [BasePagingDataSource.invalidate]
|
||||
*/
|
||||
fun invalidateDataSource() = currentSource.value?.invalidate()
|
||||
// endregion
|
||||
|
||||
@@ -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