mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Show no file type icon if unknown file type
This commit is contained in:
@@ -115,7 +115,10 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||
String extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(attachment.getMimeType());
|
||||
if (extension != null)
|
||||
resid = context.getResources().getIdentifier("file_" + extension, "drawable", context.getPackageName());
|
||||
ivType.setImageResource(resid == 0 ? R.drawable.baseline_description_24 : resid);
|
||||
if (resid == 0)
|
||||
ivType.setImageDrawable(null);
|
||||
else
|
||||
ivType.setImageResource(resid);
|
||||
|
||||
tvName.setText(attachment.name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user