forked from mirror/monocles_chat_clean
Attach voice message to input field instead of directly send
This commit is contained in:
parent
2d76569b9f
commit
f92211835e
1 changed files with 6 additions and 6 deletions
|
@ -5422,9 +5422,9 @@ public class ConversationFragment extends XmppFragment
|
||||||
() -> {
|
() -> {
|
||||||
activity.setResult(
|
activity.setResult(
|
||||||
Activity.RESULT_OK, new Intent().setData(Uri.fromFile(outputFile)));
|
Activity.RESULT_OK, new Intent().setData(Uri.fromFile(outputFile)));
|
||||||
//mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING));
|
mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING));
|
||||||
//toggleInputMethod();
|
toggleInputMethod();
|
||||||
attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/oga;codecs=opus");
|
//attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/oga;codecs=opus");
|
||||||
binding.recordingVoiceActivity.setVisibility(View.GONE);
|
binding.recordingVoiceActivity.setVisibility(View.GONE);
|
||||||
});
|
});
|
||||||
} else if ("mpeg4".equals(userChosenCodec) || !Config.USE_OPUS_VOICE_MESSAGES) {
|
} else if ("mpeg4".equals(userChosenCodec) || !Config.USE_OPUS_VOICE_MESSAGES) {
|
||||||
|
@ -5443,9 +5443,9 @@ public class ConversationFragment extends XmppFragment
|
||||||
() -> {
|
() -> {
|
||||||
activity.setResult(
|
activity.setResult(
|
||||||
Activity.RESULT_OK, new Intent().setData(Uri.fromFile(outputFile)));
|
Activity.RESULT_OK, new Intent().setData(Uri.fromFile(outputFile)));
|
||||||
//mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING));
|
mediaPreviewAdapter.addMediaPreviews(Attachment.of(getActivity(), Uri.fromFile(outputFile), Attachment.Type.RECORDING));
|
||||||
//toggleInputMethod();
|
toggleInputMethod();
|
||||||
attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/mp4");
|
//attachFileToConversation(conversation, Uri.fromFile(outputFile), "audio/mp4");
|
||||||
binding.recordingVoiceActivity.setVisibility(View.GONE);
|
binding.recordingVoiceActivity.setVisibility(View.GONE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue