mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Remove text from parent interface.
This commit is contained in:
+3
-1
@@ -660,7 +660,9 @@ private fun ReplyToContentText(metadata: InReplyToMetadata?) {
|
|||||||
val text = when (metadata) {
|
val text = when (metadata) {
|
||||||
InReplyToMetadata.Redacted -> stringResource(id = CommonStrings.common_message_removed)
|
InReplyToMetadata.Redacted -> stringResource(id = CommonStrings.common_message_removed)
|
||||||
InReplyToMetadata.UnableToDecrypt -> stringResource(id = CommonStrings.common_waiting_for_decryption_key)
|
InReplyToMetadata.UnableToDecrypt -> stringResource(id = CommonStrings.common_waiting_for_decryption_key)
|
||||||
else -> metadata?.text.orEmpty()
|
is InReplyToMetadata.Text -> metadata.text
|
||||||
|
is InReplyToMetadata.Thumbnail -> metadata.text
|
||||||
|
null -> ""
|
||||||
}
|
}
|
||||||
val iconResourceId = when (metadata) {
|
val iconResourceId = when (metadata) {
|
||||||
InReplyToMetadata.Redacted -> CompoundDrawables.ic_compound_delete
|
InReplyToMetadata.Redacted -> CompoundDrawables.ic_compound_delete
|
||||||
|
|||||||
+5
-9
@@ -43,24 +43,20 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
|||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
internal sealed interface InReplyToMetadata {
|
internal sealed interface InReplyToMetadata {
|
||||||
val text: String?
|
|
||||||
|
|
||||||
data class Thumbnail(
|
data class Thumbnail(
|
||||||
val attachmentThumbnailInfo: AttachmentThumbnailInfo
|
val attachmentThumbnailInfo: AttachmentThumbnailInfo
|
||||||
) : InReplyToMetadata {
|
) : InReplyToMetadata {
|
||||||
override val text: String? = attachmentThumbnailInfo.textContent
|
val text: String = attachmentThumbnailInfo.textContent.orEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Text(
|
data class Text(
|
||||||
override val text: String
|
val text: String
|
||||||
) : InReplyToMetadata
|
) : InReplyToMetadata
|
||||||
|
|
||||||
abstract class Informative : InReplyToMetadata {
|
sealed interface Informative : InReplyToMetadata
|
||||||
override val text: String? = null
|
|
||||||
}
|
|
||||||
|
|
||||||
data object Redacted : Informative()
|
data object Redacted : Informative
|
||||||
data object UnableToDecrypt : Informative()
|
data object UnableToDecrypt : Informative
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user