Skip to content

Commit e358867

Browse files
committed
Use dedicated constants for unknown image dimensions in ImageStrategy
1 parent e6daf45 commit e358867

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/util/image/ImageStrategy.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,15 @@ object ImageStrategy {
186186
fun dbUrlToImageList(url: String?): List<Image> {
187187
return when (url) {
188188
null -> listOf()
189-
else -> listOf(Image(url, -1, -1, ResolutionLevel.UNKNOWN))
189+
190+
else -> listOf(
191+
Image(
192+
url,
193+
Image.HEIGHT_UNKNOWN,
194+
Image.WIDTH_UNKNOWN,
195+
ResolutionLevel.UNKNOWN
196+
)
197+
)
190198
}
191199
}
192200
}

0 commit comments

Comments
 (0)