diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt index 74f2573850..da6bd0ef4c 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt @@ -419,7 +419,6 @@ class MessageItemFactory @Inject constructor( .contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder) .highlighted(highlight) .leftGuideline(avatarSizeProvider.leftGuideline) - .filename(messageContent.body) } private fun buildVerificationRequestMessageItem( @@ -489,7 +488,7 @@ class MessageItemFactory @Inject constructor( informationData: MessageInformationData, highlight: Boolean, attributes: AbsMessageItem.Attributes, - ) = if (true || messageContent.voiceMessageIndicator != null) { + ) = if (messageContent.voiceMessageIndicator != null) { buildVoiceMessageItem(params, messageContent, informationData, highlight, attributes) } else { buildAudioMessageItem(params, messageContent, informationData, highlight, attributes) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt index 3c071578cc..3dcbdf2a48 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt @@ -96,7 +96,8 @@ abstract class MessageAudioItem : AbsMessageItem() { } private fun applyLayoutTint(holder: Holder) { - val backgroundTint = if (attributes.informationData.messageLayout is TimelineMessageLayout.Bubble) { + val backgroundTint = if (attributes.informationData.messageLayout is TimelineMessageLayout.Bubble || + attributes.informationData.messageLayout is TimelineMessageLayout.ScBubble) { Color.TRANSPARENT } else { ThemeUtils.getColor(holder.view.context, R.attr.vctr_content_quinary) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt index 02c8853922..7f0e4196c6 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt @@ -60,9 +60,6 @@ abstract class MessageVoiceItem : AbsMessageItem() { @JvmField var isLocalFile = false - @EpoxyAttribute - var filename: CharSequence? = null - @EpoxyAttribute lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder @@ -116,16 +113,6 @@ abstract class MessageVoiceItem : AbsMessageItem() { } holder.voicePlaybackWaveform.summarize() - // SC: fallback audio name if no waveform (we also use this for audio messages!) - if (waveform.isEmpty() && !filename.isNullOrBlank()) { - holder.voicePlaybackWaveform.isInvisible = true - holder.voiceMessageName.isVisible = true - holder.voiceMessageName.text = filename - } else { - holder.voicePlaybackWaveform.isVisible = true - holder.voiceMessageName.isGone = true - } - holder.voicePlaybackWaveform.setOnTouchListener { view, motionEvent -> when (motionEvent.action) { MotionEvent.ACTION_UP -> { @@ -198,7 +185,6 @@ abstract class MessageVoiceItem : AbsMessageItem() { val voicePlaybackTime by bind(R.id.voicePlaybackTime) val voicePlaybackWaveform by bind(R.id.voicePlaybackWaveform) val progressLayout by bind(R.id.messageFileUploadProgressLayout) - val voiceMessageName by bind(R.id.voiceMessageName) } companion object { diff --git a/vector/src/main/res/layout/item_timeline_event_audio_stub.xml b/vector/src/main/res/layout/item_timeline_event_audio_stub.xml index 2a6fbf5a9e..f62564a11e 100644 --- a/vector/src/main/res/layout/item_timeline_event_audio_stub.xml +++ b/vector/src/main/res/layout/item_timeline_event_audio_stub.xml @@ -6,6 +6,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" + android:minWidth="@dimen/chat_bubble_fixed_size" tools:viewBindingIgnore="true"> - \ No newline at end of file + diff --git a/vector/src/main/res/layout/item_timeline_event_voice_stub.xml b/vector/src/main/res/layout/item_timeline_event_voice_stub.xml index 804b8c9403..271981b2dd 100644 --- a/vector/src/main/res/layout/item_timeline_event_voice_stub.xml +++ b/vector/src/main/res/layout/item_timeline_event_voice_stub.xml @@ -53,21 +53,6 @@ app:layout_constraintStart_toEndOf="@id/voicePlaybackTime" app:layout_constraintTop_toTopOf="parent" /> - -