File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/src/main/java/me/ash/reader/ui/page/home/flow Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import me.ash.reader.ui.component.FeedIcon
25
25
import me.ash.reader.ui.component.base.RYAsyncImage
26
26
import me.ash.reader.ui.component.base.SIZE_1000
27
27
import me.ash.reader.ui.theme.Shape20
28
+ import java.net.URI
28
29
29
30
@Composable
30
31
fun ArticleItem (
@@ -136,12 +137,17 @@ fun ArticleItem(
136
137
137
138
// Image
138
139
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
+ }
139
145
RYAsyncImage (
140
146
modifier = Modifier
141
147
.padding(start = 10 .dp)
142
148
.size(80 .dp)
143
149
.clip(Shape20 ),
144
- data = articleWithFeed.article.img ,
150
+ data = imgUrl ,
145
151
scale = Scale .FILL ,
146
152
precision = Precision .INEXACT ,
147
153
size = SIZE_1000 ,
You can’t perform that action at this time.
0 commit comments