From f9b453d8790c1c0c37151d2304c0ff94c8b1805a Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 22 Mar 2020 18:24:50 +0100 Subject: add choose video from file to attachments menu --- src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/de/pixart/messenger') diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 7df639222..82b3cfca1 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -632,6 +632,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke popup.setOnMenuItemClickListener(attachmentItem -> { switch (attachmentItem.getItemId()) { case R.id.attach_choose_picture: + case R.id.attach_choose_video: case R.id.attach_take_picture: case R.id.attach_record_video: case R.id.attach_choose_file: @@ -996,6 +997,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke case ATTACHMENT_CHOICE_CHOOSE_FILE: case ATTACHMENT_CHOICE_RECORD_VIDEO: case ATTACHMENT_CHOICE_RECORD_VOICE: + case ATTACHMENT_CHOICE_CHOOSE_VIDEO: final Attachment.Type type = requestCode == ATTACHMENT_CHOICE_RECORD_VOICE ? Attachment.Type.RECORDING : Attachment.Type.FILE; final List fileUris = Attachment.extractAttachments(getActivity(), data, type); mediaPreviewAdapter.addMediaPreviews(fileUris); @@ -1434,6 +1436,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke handleEncryptionSelection(item); break; case R.id.attach_choose_picture: + case R.id.attach_choose_video: case R.id.attach_take_picture: case R.id.attach_record_video: case R.id.attach_choose_file: @@ -1494,6 +1497,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke case R.id.attach_choose_picture: attachFile(ATTACHMENT_CHOICE_CHOOSE_IMAGE); break; + case R.id.attach_choose_video: + attachFile(ATTACHMENT_CHOICE_CHOOSE_VIDEO); + break; case R.id.attach_take_picture: attachFile(ATTACHMENT_CHOICE_TAKE_PHOTO); break; -- cgit v1.2.3