fix: folders in recent files
This commit is contained in:
parent
d784214c4b
commit
5773a43da5
@ -968,6 +968,10 @@ public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLa
|
||||
ListItem item = new ListItem();
|
||||
item.title = file.getName();
|
||||
item.file = file;
|
||||
if (file.isDirectory()) {
|
||||
item.icon = R.drawable.files_folder;
|
||||
item.subtitle = LocaleController.getString("Folder", R.string.Folder);
|
||||
} else {
|
||||
String fname = file.getName();
|
||||
String[] sp = fname.split("\\.");
|
||||
item.ext = sp.length > 1 ? sp[sp.length - 1] : "?";
|
||||
@ -976,6 +980,7 @@ public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLa
|
||||
if (fname.endsWith(".jpg") || fname.endsWith(".png") || fname.endsWith(".gif") || fname.endsWith(".jpeg")) {
|
||||
item.thumb = file.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
listAdapter.recentItems.add(item);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user