Removed debugging logging.
This commit is contained in:
parent
f6999dd547
commit
d0557cf653
@ -5,7 +5,6 @@ import android.net.Uri
|
|||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import android.text.Html
|
import android.text.Html
|
||||||
import android.util.Log
|
|
||||||
import android.webkit.URLUtil
|
import android.webkit.URLUtil
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
|
||||||
@ -145,20 +144,17 @@ data class Item(
|
|||||||
|
|
||||||
fun preloadImages(context: Context) : Boolean {
|
fun preloadImages(context: Context) : Boolean {
|
||||||
val imageUrls = this.getImages()
|
val imageUrls = this.getImages()
|
||||||
Log.d("Carica", "Caricando immagini")
|
|
||||||
|
|
||||||
val glideOptions = RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.ALL)
|
val glideOptions = RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.ALL)
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (url in imageUrls) {
|
for (url in imageUrls) {
|
||||||
Log.d("Carica", url)
|
|
||||||
if ( URLUtil.isValidUrl(url)) {
|
if ( URLUtil.isValidUrl(url)) {
|
||||||
val image = Glide.with(context).asBitmap()
|
val image = Glide.with(context).asBitmap()
|
||||||
.apply(glideOptions)
|
.apply(glideOptions)
|
||||||
.load(url).submit().get()
|
.load(url).submit().get()
|
||||||
}
|
}
|
||||||
Log.d("Carica", "Immagine presa")
|
|
||||||
}
|
}
|
||||||
} catch (e : Error) {
|
} catch (e : Error) {
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user