Cleanup and split long lines

This commit is contained in:
Benoit Marty 2020-08-11 17:33:40 +02:00 committed by Valere
parent d6f96e3d64
commit cc57a73f23
3 changed files with 6 additions and 8 deletions

View File

@ -28,7 +28,6 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.features.home.room.detail.timeline.helper.ContentDownloadStateTrackerBinder import im.vector.app.features.home.room.detail.timeline.helper.ContentDownloadStateTrackerBinder
import im.vector.app.features.home.room.detail.timeline.helper.ContentUploadStateTrackerBinder import im.vector.app.features.home.room.detail.timeline.helper.ContentUploadStateTrackerBinder
import im.vector.matrix.android.api.session.room.send.SendState
@EpoxyModelClass(layout = R.layout.item_timeline_event_base) @EpoxyModelClass(layout = R.layout.item_timeline_event_base)
abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() { abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() {
@ -88,8 +87,7 @@ abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() {
holder.fileImageWrapper.setOnLongClickListener(attributes.itemLongClickListener) holder.fileImageWrapper.setOnLongClickListener(attributes.itemLongClickListener)
holder.filenameView.paintFlags = (holder.filenameView.paintFlags or Paint.UNDERLINE_TEXT_FLAG) holder.filenameView.paintFlags = (holder.filenameView.paintFlags or Paint.UNDERLINE_TEXT_FLAG)
holder.eventSendingIndicator.isVisible = attributes.informationData.sendState == SendState.SENDING holder.eventSendingIndicator.isVisible = attributes.informationData.sendState.isInProgress()
|| attributes.informationData.sendState == SendState.ENCRYPTING
} }
override fun unbind(holder: Holder) { override fun unbind(holder: Holder) {

View File

@ -63,7 +63,7 @@ abstract class MessageImageVideoItem : AbsMessageItem<MessageImageVideoItem.Hold
renderSendState(holder.imageView, null, holder.failedToSendIndicator) renderSendState(holder.imageView, null, holder.failedToSendIndicator)
holder.playContentView.visibility = if (playable) View.VISIBLE else View.GONE holder.playContentView.visibility = if (playable) View.VISIBLE else View.GONE
holder.eventSendingIndicator.isVisible = attributes.informationData.sendState == SendState.SENDING || attributes.informationData.sendState == SendState.ENCRYPTING holder.eventSendingIndicator.isVisible = attributes.informationData.sendState.isInProgress()
} }
override fun unbind(holder: Holder) { override fun unbind(holder: Holder) {

View File

@ -43,15 +43,15 @@
<TextView <TextView
android:id="@+id/messageFilenameView" android:id="@+id/messageFilenameView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
app:layout_constraintHorizontal_bias="0"
app:layout_constrainedWidth="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="32dp" android:layout_marginEnd="32dp"
android:autoLink="none" android:autoLink="none"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/chat_avatar_size" android:minHeight="@dimen/chat_avatar_size"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@+id/messageFileImageView" app:layout_constraintStart_toEndOf="@+id/messageFileImageView"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="A filename here" /> tools:text="A filename here" />
@ -62,9 +62,9 @@
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="16dp" android:layout_height="16dp"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"
app:layout_constraintStart_toEndOf="@id/messageFilenameView" app:layout_constraintStart_toEndOf="@id/messageFilenameView"
app:layout_constraintTop_toTopOf="@id/messageFilenameView" /> app:layout_constraintTop_toTopOf="@id/messageFilenameView"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Barrier <androidx.constraintlayout.widget.Barrier