Remove audio item from attachment picker.

Keep some related code for now
This commit is contained in:
Benoit Marty 2022-01-04 18:50:32 +01:00
parent 97459bc822
commit d07dd154b8
4 changed files with 0 additions and 22 deletions

View File

@ -69,7 +69,6 @@ class AttachmentTypeSelectorView(context: Context,
views.attachmentCameraButton.configure(Type.CAMERA) views.attachmentCameraButton.configure(Type.CAMERA)
views.attachmentFileButton.configure(Type.FILE) views.attachmentFileButton.configure(Type.FILE)
views.attachmentStickersButton.configure(Type.STICKER) views.attachmentStickersButton.configure(Type.STICKER)
views.attachmentAudioButton.configure(Type.AUDIO)
views.attachmentContactButton.configure(Type.CONTACT) views.attachmentContactButton.configure(Type.CONTACT)
views.attachmentPollButton.configure(Type.POLL) views.attachmentPollButton.configure(Type.POLL)
width = LinearLayout.LayoutParams.MATCH_PARENT width = LinearLayout.LayoutParams.MATCH_PARENT
@ -128,7 +127,6 @@ class AttachmentTypeSelectorView(context: Context,
Type.GALLERY -> views.attachmentGalleryButton Type.GALLERY -> views.attachmentGalleryButton
Type.FILE -> views.attachmentFileButton Type.FILE -> views.attachmentFileButton
Type.STICKER -> views.attachmentStickersButton Type.STICKER -> views.attachmentStickersButton
Type.AUDIO -> views.attachmentAudioButton
Type.CONTACT -> views.attachmentContactButton Type.CONTACT -> views.attachmentContactButton
Type.POLL -> views.attachmentPollButton Type.POLL -> views.attachmentPollButton
}.let { }.let {
@ -212,7 +210,6 @@ class AttachmentTypeSelectorView(context: Context,
GALLERY(PERMISSIONS_EMPTY, R.string.tooltip_attachment_gallery), GALLERY(PERMISSIONS_EMPTY, R.string.tooltip_attachment_gallery),
FILE(PERMISSIONS_EMPTY, R.string.tooltip_attachment_file), FILE(PERMISSIONS_EMPTY, R.string.tooltip_attachment_file),
STICKER(PERMISSIONS_EMPTY, R.string.tooltip_attachment_sticker), STICKER(PERMISSIONS_EMPTY, R.string.tooltip_attachment_sticker),
AUDIO(PERMISSIONS_EMPTY, R.string.tooltip_attachment_audio),
CONTACT(PERMISSIONS_FOR_PICKING_CONTACT, R.string.tooltip_attachment_contact), CONTACT(PERMISSIONS_FOR_PICKING_CONTACT, R.string.tooltip_attachment_contact),
POLL(PERMISSIONS_EMPTY, R.string.tooltip_attachment_poll) POLL(PERMISSIONS_EMPTY, R.string.tooltip_attachment_poll)
} }

View File

@ -1163,12 +1163,6 @@ class RoomDetailFragment @Inject constructor(
} }
} }
private val attachmentAudioActivityResultLauncher = registerStartForActivityResult {
if (it.resultCode == Activity.RESULT_OK) {
attachmentsHelper.onAudioResult(it.data)
}
}
private val attachmentContactActivityResultLauncher = registerStartForActivityResult { private val attachmentContactActivityResultLauncher = registerStartForActivityResult {
if (it.resultCode == Activity.RESULT_OK) { if (it.resultCode == Activity.RESULT_OK) {
attachmentsHelper.onContactResult(it.data) attachmentsHelper.onContactResult(it.data)
@ -2218,7 +2212,6 @@ class RoomDetailFragment @Inject constructor(
) )
AttachmentTypeSelectorView.Type.FILE -> attachmentsHelper.selectFile(attachmentFileActivityResultLauncher) AttachmentTypeSelectorView.Type.FILE -> attachmentsHelper.selectFile(attachmentFileActivityResultLauncher)
AttachmentTypeSelectorView.Type.GALLERY -> attachmentsHelper.selectGallery(attachmentMediaActivityResultLauncher) AttachmentTypeSelectorView.Type.GALLERY -> attachmentsHelper.selectGallery(attachmentMediaActivityResultLauncher)
AttachmentTypeSelectorView.Type.AUDIO -> attachmentsHelper.selectAudio(attachmentAudioActivityResultLauncher)
AttachmentTypeSelectorView.Type.CONTACT -> attachmentsHelper.selectContact(attachmentContactActivityResultLauncher) AttachmentTypeSelectorView.Type.CONTACT -> attachmentsHelper.selectContact(attachmentContactActivityResultLauncher)
AttachmentTypeSelectorView.Type.STICKER -> roomDetailViewModel.handle(RoomDetailAction.SelectStickerAttachment) AttachmentTypeSelectorView.Type.STICKER -> roomDetailViewModel.handle(RoomDetailAction.SelectStickerAttachment)
AttachmentTypeSelectorView.Type.POLL -> navigator.openCreatePoll(requireContext(), roomDetailArgs.roomId) AttachmentTypeSelectorView.Type.POLL -> navigator.openCreatePoll(requireContext(), roomDetailArgs.roomId)

View File

@ -82,17 +82,6 @@
android:src="@drawable/ic_attachment_camera" android:src="@drawable/ic_attachment_camera"
app:tint="?colorPrimary" /> app:tint="?colorPrimary" />
<!-- TODO. Request for new icon -->
<ImageButton
android:id="@+id/attachmentAudioButton"
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:layout_marginStart="2dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/attachment_type_audio"
android:src="@drawable/ic_attachment_audio_white_24dp"
app:tint="?colorPrimary" />
<!-- TODO. Request for new icon --> <!-- TODO. Request for new icon -->
<ImageButton <ImageButton
android:id="@+id/attachmentContactButton" android:id="@+id/attachmentContactButton"

View File

@ -3681,7 +3681,6 @@
<string name="tooltip_attachment_gallery">Send images and videos</string> <string name="tooltip_attachment_gallery">Send images and videos</string>
<string name="tooltip_attachment_file">Upload file</string> <string name="tooltip_attachment_file">Upload file</string>
<string name="tooltip_attachment_sticker">Send sticker</string> <string name="tooltip_attachment_sticker">Send sticker</string>
<string name="tooltip_attachment_audio">WILL BE REMOVED</string>
<string name="tooltip_attachment_contact">Open contacts</string> <string name="tooltip_attachment_contact">Open contacts</string>
<string name="tooltip_attachment_poll">Create poll</string> <string name="tooltip_attachment_poll">Create poll</string>