mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
69258b092d
commit
982b156a20
|
@ -81,6 +81,9 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
|
|||
}
|
||||
|
||||
private void bindTo(EntityAttachment attachment) {
|
||||
tvCaption.setText(attachment.name);
|
||||
tvCaption.setVisibility(TextUtils.isEmpty(attachment.name) ? View.GONE : View.VISIBLE);
|
||||
|
||||
if (attachment.available) {
|
||||
if (BuildConfig.DEBUG &&
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
||||
|
@ -106,10 +109,6 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
|
|||
} else
|
||||
ivImage.setImageResource(attachment.progress == null
|
||||
? R.drawable.twotone_image_24 : R.drawable.twotone_hourglass_top_24);
|
||||
|
||||
tvCaption.setVisibility(TextUtils.isEmpty(attachment.name) ? View.GONE : View.VISIBLE);
|
||||
|
||||
tvCaption.setText(attachment.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue