Fix bug when replying with a voice note.

This commit is contained in:
Greyson Parrelli
2025-09-17 13:30:02 -04:00
parent f5effa5be9
commit 52005cf62c
4 changed files with 25 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.os.bundleOf
import androidx.fragment.app.FragmentActivity
import org.signal.core.ui.compose.Dividers
import org.thoughtcrime.securesms.compose.ComposeFullScreenDialogFragment
import org.thoughtcrime.securesms.database.model.MessageRecord
import org.thoughtcrime.securesms.messagedetails.InternalMessageDetailsViewModel.AttachmentInfo
@@ -143,8 +144,12 @@ private fun Content(state: ViewState) {
.fillMaxWidth()
)
} else {
state.attachments.forEach { attachment ->
state.attachments.forEachIndexed { i, attachment ->
AttachmentBlock(attachment)
if (i != state.attachments.lastIndex) {
Dividers.Default()
}
}
}
}
@@ -199,6 +204,10 @@ private fun AttachmentBlock(attachment: AttachmentInfo) {
name = "Content Type",
value = attachment.contentType ?: "null"
)
ClickToCopyRow(
name = "Quote Target Content Type",
value = attachment.quoteTargetContentType ?: "Not a quote"
)
ClickToCopyRow(
name = "Start Hash",
value = attachment.hashStart ?: "null"

View File

@@ -39,6 +39,7 @@ class InternalMessageDetailsViewModel(val messageId: Long) : ViewModel() {
AttachmentInfo(
id = attachment.attachmentId.id,
contentType = attachment.contentType,
quoteTargetContentType = attachment.quoteTargetContentType,
size = attachment.size,
fileName = attachment.fileName,
hashStart = info?.hashStart,
@@ -63,6 +64,7 @@ class InternalMessageDetailsViewModel(val messageId: Long) : ViewModel() {
data class AttachmentInfo(
val id: Long,
val contentType: String?,
val quoteTargetContentType: String?,
val size: Long,
val fileName: String?,
val hashStart: String?,