Skip to content
Snippets Groups Projects
Commit 23356d7a authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Revert "ImageLoader: Skip network files"

This reverts commit d8eb796b.
parent 605fa783
No related branches found
No related tags found
No related merge requests found
......@@ -36,10 +36,8 @@ fun loadImage(v: View, item: MediaLibraryItem?) {
|| item.itemType == MediaLibraryItem.TYPE_GENRE
|| item.itemType == MediaLibraryItem.TYPE_PLAYLIST)
return
val binding = DataBindingUtil.findBinding<ViewDataBinding>(v)
val isMedia = item.itemType == MediaLibraryItem.TYPE_MEDIA
if (isMedia && (item as MediaWrapper).uri.scheme != "file") {
return
}
val isGroup = isMedia && (item as MediaWrapper).type == MediaWrapper.TYPE_GROUP
val isFolder = !isMedia && item.itemType == MediaLibraryItem.TYPE_FOLDER;
val cacheKey = when {
......@@ -48,7 +46,6 @@ fun loadImage(v: View, item: MediaLibraryItem?) {
else -> ThumbnailsProvider.getMediaCacheKey(isMedia, item)
}
val bitmap = if (cacheKey !== null) sBitmapCache.getBitmapFromMemCache(cacheKey) else null
val binding = DataBindingUtil.findBinding<ViewDataBinding>(v)
if (bitmap !== null) updateImageView(bitmap, v, binding)
else AppScope.launch { getImage(v, findInLibrary(item, isMedia, isGroup), binding) }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment