mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Fixed. Icons which have extensions in UpperCase, in the uploads view are not correct
This commit is contained in:
parent
cd1a150bf9
commit
6caad2be05
2 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
|
|||
}
|
||||
} else {
|
||||
Uri selectedUri = Uri.fromFile(file);
|
||||
String fileExtension = MimeTypeMap.getFileExtensionFromUrl(selectedUri.toString());
|
||||
String fileExtension = MimeTypeMap.getFileExtensionFromUrl(selectedUri.toString().toLowerCase());
|
||||
String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension);
|
||||
fileIcon.setImageResource(DisplayUtils.getResourceId(mimeType, file.getName()));
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ public class BitmapUtils {
|
|||
*/
|
||||
public static boolean isImage(File file) {
|
||||
Uri selectedUri = Uri.fromFile(file);
|
||||
String fileExtension = MimeTypeMap.getFileExtensionFromUrl(selectedUri.toString());
|
||||
String fileExtension = MimeTypeMap.getFileExtensionFromUrl(selectedUri.toString().toLowerCase());
|
||||
String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension);
|
||||
|
||||
return (mimeType != null && mimeType.startsWith("image/"));
|
||||
|
|
Loading…
Reference in a new issue