mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Fix bug when replying with a voice note.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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?,
|
||||
|
||||
Reference in New Issue
Block a user