Fixed selecting single attachment

This commit is contained in:
M66B 2019-01-06 14:48:25 +00:00
parent 24b828141e
commit 701c798519
1 changed files with 6 additions and 1 deletions

View File

@ -926,13 +926,18 @@ public class FragmentCompose extends FragmentEx {
} else if (requestCode == ActivityCompose.REQUEST_ATTACHMENT) {
if (data != null) {
ClipData clipData = data.getClipData();
if (clipData != null)
if (clipData == null) {
Uri uri = data.getData();
if (uri != null)
handleAddAttachment(uri, false);
} else {
for (int i = 0; i < clipData.getItemCount(); i++) {
ClipData.Item item = clipData.getItemAt(i);
Uri uri = item.getUri();
if (uri != null)
handleAddAttachment(uri, false);
}
}
}
} else if (requestCode == ActivityCompose.REQUEST_ENCRYPT) {
if (data != null) {