File tree Expand file tree Collapse file tree
app/src/main/java/me/ash/reader/ui/page/home/flow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import me.ash.reader.ui.component.FeedIcon
2525import me.ash.reader.ui.component.base.RYAsyncImage
2626import me.ash.reader.ui.component.base.SIZE_1000
2727import me.ash.reader.ui.theme.Shape20
28+ import java.net.URI
2829
2930@Composable
3031fun ArticleItem (
@@ -136,12 +137,17 @@ fun ArticleItem(
136137
137138 // Image
138139 if (articleWithFeed.article.img != null && articleListImage.value) {
140+ var imgUrl: String = articleWithFeed.article.img!!
141+ if (imgUrl.startsWith(" /" )) {
142+ val uri = URI .create(articleWithFeed.feed.url)
143+ imgUrl = " ${uri.scheme} ://${uri.host}$imgUrl "
144+ }
139145 RYAsyncImage (
140146 modifier = Modifier
141147 .padding(start = 10 .dp)
142148 .size(80 .dp)
143149 .clip(Shape20 ),
144- data = articleWithFeed.article.img ,
150+ data = imgUrl ,
145151 scale = Scale .FILL ,
146152 precision = Precision .INEXACT ,
147153 size = SIZE_1000 ,
You can’t perform that action at this time.
0 commit comments