Improves code formatting

This commit is contained in:
ericdecanini 2022-03-29 16:25:01 +02:00
parent fa56a5efa9
commit cc5e8f35a7
3 changed files with 4 additions and 8 deletions

View file

@ -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) {

View file

@ -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)
}
}

View file

@ -58,10 +58,6 @@ abstract class MessageVoiceItem : AbsMessageItem<MessageVoiceItem.Holder>() {
@JvmField
var isLocalFile = false
@EpoxyAttribute
@JvmField
var isDownloaded = false
@EpoxyAttribute
lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder