Merge pull request #13207 from TobiGr/small-fixes
Small improvements to Image handling
This commit is contained in:
commit
0d65733e53
2 changed files with 11 additions and 3 deletions
|
|
@ -216,9 +216,9 @@ public abstract class BaseDescriptionFragment extends BaseFragment {
|
|||
|| image.getWidth() != Image.WIDTH_UNKNOWN
|
||||
// if even the resolution level is unknown, ?x? will be shown
|
||||
|| image.getEstimatedResolutionLevel() == Image.ResolutionLevel.UNKNOWN) {
|
||||
urls.append(imageSizeToText(image.getHeight()));
|
||||
urls.append('x');
|
||||
urls.append(imageSizeToText(image.getWidth()));
|
||||
urls.append('x');
|
||||
urls.append(imageSizeToText(image.getHeight()));
|
||||
} else {
|
||||
switch (image.getEstimatedResolutionLevel()) {
|
||||
case LOW -> urls.append(getString(R.string.image_quality_low));
|
||||
|
|
|
|||
|
|
@ -186,7 +186,15 @@ object ImageStrategy {
|
|||
fun dbUrlToImageList(url: String?): List<Image> {
|
||||
return when (url) {
|
||||
null -> listOf()
|
||||
else -> listOf(Image(url, -1, -1, ResolutionLevel.UNKNOWN))
|
||||
|
||||
else -> listOf(
|
||||
Image(
|
||||
url,
|
||||
Image.HEIGHT_UNKNOWN,
|
||||
Image.WIDTH_UNKNOWN,
|
||||
ResolutionLevel.UNKNOWN
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue