Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import me.ash.reader.ui.component.FeedIcon
import me.ash.reader.ui.component.base.RYAsyncImage
import me.ash.reader.ui.component.base.SIZE_1000
import me.ash.reader.ui.theme.Shape20
import java.net.URI

@Composable
fun ArticleItem(
Expand Down Expand Up @@ -136,12 +137,17 @@ fun ArticleItem(

// Image
if (articleWithFeed.article.img != null && articleListImage.value) {
var imgUrl: String = articleWithFeed.article.img!!
if (imgUrl.startsWith("/")) {
val uri = URI.create(articleWithFeed.feed.url)
imgUrl = "${uri.scheme}://${uri.host}$imgUrl"
}
RYAsyncImage(
modifier = Modifier
.padding(start = 10.dp)
.size(80.dp)
.clip(Shape20),
data = articleWithFeed.article.img,
data = imgUrl,
scale = Scale.FILL,
precision = Precision.INEXACT,
size = SIZE_1000,
Expand Down