mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Improves code formatting
This commit is contained in:
parent
fa56a5efa9
commit
cc5e8f35a7
3 changed files with 4 additions and 8 deletions
|
@ -1193,7 +1193,7 @@ class TimelineFragment @Inject constructor(
|
|||
val nonFormattedBody = when (messageContent) {
|
||||
is MessageAudioContent -> getAudioContentBodyText(messageContent)
|
||||
is MessagePollContent -> messageContent.getBestPollCreationInfo()?.question?.getBestQuestion()
|
||||
else -> messageContent?.body ?: ""
|
||||
else -> messageContent?.body.orEmpty()
|
||||
}
|
||||
var formattedBody: CharSequence? = null
|
||||
if (messageContent is MessageTextContent && messageContent.format == MessageFormat.FORMAT_MATRIX_HTML) {
|
||||
|
|
|
@ -74,13 +74,13 @@ abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>() {
|
|||
}
|
||||
|
||||
private fun bindUploadState(holder: Holder) {
|
||||
if (!attributes.informationData.sendState.hasFailed()) {
|
||||
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, isLocalFile, holder.progressLayout)
|
||||
} else {
|
||||
if (attributes.informationData.sendState.hasFailed()) {
|
||||
holder.audioPlaybackControlButton.setImageResource(R.drawable.ic_cross)
|
||||
holder.audioPlaybackControlButton.contentDescription =
|
||||
holder.view.context.getString(R.string.error_audio_message_unable_to_play, filename)
|
||||
holder.progressLayout.isVisible = false
|
||||
} else {
|
||||
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, isLocalFile, holder.progressLayout)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,10 +58,6 @@ abstract class MessageVoiceItem : AbsMessageItem<MessageVoiceItem.Holder>() {
|
|||
@JvmField
|
||||
var isLocalFile = false
|
||||
|
||||
@EpoxyAttribute
|
||||
@JvmField
|
||||
var isDownloaded = false
|
||||
|
||||
@EpoxyAttribute
|
||||
lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder
|
||||
|
||||
|
|
Loading…
Reference in a new issue