From e01aad1015f609f24a544df203e80b09380cbfe1 Mon Sep 17 00:00:00 2001 From: Arne Date: Wed, 20 Nov 2024 15:21:12 +0100 Subject: [PATCH] Attach voice message to input field instead of directly send --- .../siacs/conversations/ui/ConversationFragment.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 38c77235a..db6a731ff 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -5422,9 +5422,9 @@ public class ConversationFragment extends XmppFragment () -> { activity.setResult( Activity.RESULT_OK, new Intent().setData(Uri.fromFile(outputFile))); - //mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING)); - //toggleInputMethod(); - attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/oga;codecs=opus"); + mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING)); + toggleInputMethod(); + //attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/oga;codecs=opus"); binding.recordingVoiceActivity.setVisibility(View.GONE); }); } else if ("mpeg4".equals(userChosenCodec) || !Config.USE_OPUS_VOICE_MESSAGES) { @@ -5443,9 +5443,9 @@ public class ConversationFragment extends XmppFragment () -> { activity.setResult( Activity.RESULT_OK, new Intent().setData(Uri.fromFile(outputFile))); - //mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING)); - //toggleInputMethod(); - attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/mp4"); + mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING)); + toggleInputMethod(); + //attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/mp4"); binding.recordingVoiceActivity.setVisibility(View.GONE); }); }