Prevent Glide from opening svg images

This commit is contained in:
davidoskky 2021-01-09 16:23:42 +01:00
parent 0d84a2d7e9
commit 9e0fdf30ec

View File

@ -141,7 +141,14 @@ data class Item(
var allImages = ArrayList<String>() var allImages = ArrayList<String>()
for ( image in Jsoup.parse(content).getElementsByTag("img")) { for ( image in Jsoup.parse(content).getElementsByTag("img")) {
allImages.add(image.attr("src")) val url = image.attr("src")
if (url.toLowerCase().contains(".jpg") ||
url.toLowerCase().contains(".jpeg") ||
url.toLowerCase().contains(".png") ||
url.toLowerCase().contains(".webp"))
{
allImages.add(url)
}
} }
return allImages return allImages
} }