Skip to content

Commit

Permalink
Fix:Error when fetching imageid from the *providers object #373
Browse files Browse the repository at this point in the history
  • Loading branch information
James Maina committed Jan 24, 2017
1 parent 8df863a commit f0c3023
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
final ImageView kiview = (ImageView)convertView.findViewById(R.id.img_profile);
//start profile image
viewHolder.profilepic.setTag(R.id.entity_id, pc.getColumnmaps().get("_id"));//required when saving file to disk
if(pc.getDetails().containsKey("imageid")){//image already in local storage most likey ):
if(pc.getDetails().containsKey("imageid") && pc.getDetails().get("imageid")!=null && !pc.getDetails().get("imageid").isEmpty()){//image already in local storage most likey ):
mImageLoader.getImageWithId(pc.getColumnmaps().get("_id"), OpenSRPImageLoader.getStaticImageListener(viewHolder.profilepic, R.drawable.woman_placeholder, R.drawable.woman_placeholder));

}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ else if(pc.getDetails().get("gender") != null && pc.getDetails().get("gender").e

//start profile image
viewHolder.profilepic.setTag(R.id.entity_id, pc.getColumnmaps().get("_id"));//required when saving file to disk
if(pc.getDetails().containsKey("imageid")){//image already in local storage most likey ):
if(pc.getDetails().containsKey("imageid") && pc.getDetails().get("imageid")!=null && !pc.getDetails().get("imageid").isEmpty()){//image already in local storage most likey ):
mImageLoader.getImageWithId(pc.getColumnmaps().get("_id"), OpenSRPImageLoader.getStaticImageListener(viewHolder.profilepic, R.drawable.woman_placeholder, R.drawable.woman_placeholder));

}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
viewHolder.visit_status.setText("");
//start profile image
viewHolder.profilepic.setTag(R.id.entity_id, pc.getColumnmaps().get("_id"));//required when saving file to disk
if(pc.getDetails().containsKey("imageid")){//image already in local storage most likey ):
if(pc.getDetails().containsKey("imageid") && pc.getDetails().get("imageid")!=null && !pc.getDetails().get("imageid").isEmpty()){//image already in local storage most likey ):
mImageLoader.getImageWithId(pc.getColumnmaps().get("_id"), OpenSRPImageLoader.getStaticImageListener(viewHolder.profilepic, R.drawable.woman_placeholder, R.drawable.woman_placeholder));

}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
final ImageView kiview = (ImageView)convertView.findViewById(R.id.img_profile);
//start profile image
viewHolder.profilepic.setTag(R.id.entity_id, pc.getColumnmaps().get("_id"));//required when saving file to disk
if(pc.getDetails().containsKey("imageid")){//image already in local storage most likey ):
if(pc.getDetails().containsKey("imageid") && pc.getDetails().get("imageid")!=null && !pc.getDetails().get("imageid").isEmpty()){//image already in local storage most likey ):
mImageLoader.getImageWithId(pc.getColumnmaps().get("_id"), OpenSRPImageLoader.getStaticImageListener(viewHolder.profilepic, R.drawable.woman_placeholder, R.drawable.woman_placeholder));

}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {

//start profile image
viewHolder.profilepic.setTag(R.id.entity_id, pc.getColumnmaps().get("_id"));//required when saving file to disk
if(pc.getDetails().containsKey("imageid")){//image already in local storage most likey ):
if(pc.getDetails().containsKey("imageid") && pc.getDetails().get("imageid")!=null && !pc.getDetails().get("imageid").isEmpty()){//image already in local storage most likey ):
mImageLoader.getImageWithId(pc.getColumnmaps().get("_id"), OpenSRPImageLoader.getStaticImageListener(viewHolder.profilepic, R.drawable.woman_placeholder, R.drawable.woman_placeholder));

}else{
Expand Down

0 comments on commit f0c3023

Please sign in to comment.