mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 999853 - Never pass an empty image path to Picasso. r=lucasr
This commit is contained in:
parent
84acaaf0a6
commit
1fbab8a4d9
@ -29,10 +29,15 @@ class PanelBackItemView extends LinearLayout {
|
||||
title = (TextView) findViewById(R.id.title);
|
||||
|
||||
final ImageView image = (ImageView) findViewById(R.id.image);
|
||||
Picasso.with(getContext())
|
||||
.load(backImageUrl)
|
||||
.placeholder(R.drawable.folder_up)
|
||||
.into(image);
|
||||
|
||||
if (TextUtils.isEmpty(backImageUrl)) {
|
||||
image.setImageResource(R.drawable.folder_up);
|
||||
} else {
|
||||
Picasso.with(getContext())
|
||||
.load(backImageUrl)
|
||||
.placeholder(R.drawable.folder_up)
|
||||
.into(image);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateFromFilter(FilterDetail filter) {
|
||||
|
@ -437,10 +437,8 @@ abstract class PanelLayout extends FrameLayout {
|
||||
final String imageUrl = (emptyViewConfig == null) ? null : emptyViewConfig.getImageUrl();
|
||||
final ImageView imageView = (ImageView) view.findViewById(R.id.home_empty_image);
|
||||
|
||||
if (imageUrl == null) {
|
||||
Picasso.with(getContext())
|
||||
.load(R.drawable.icon_home_empty_firefox)
|
||||
.into(imageView);
|
||||
if (TextUtils.isEmpty(imageUrl)) {
|
||||
imageView.setImageResource(R.drawable.icon_home_empty_firefox);
|
||||
} else {
|
||||
Picasso.with(getContext())
|
||||
.load(imageUrl)
|
||||
|
Loading…
Reference in New Issue
Block a user