mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed upload progress indicator not visible when uploading only one file
This commit is contained in:
parent
59ebff6d15
commit
6c20ac8d40
2 changed files with 20 additions and 2 deletions
|
|
@ -647,7 +647,7 @@ class ConversationViewModel @UiThread constructor() : AbstractConversationViewMo
|
|||
// Prevents message duplicates
|
||||
val eventsToAdd = arrayListOf<EventLog>()
|
||||
for (event in eventLogs) {
|
||||
if (event.chatMessage != null) {
|
||||
if (event.chatMessage != null && event.chatMessage?.messageId.orEmpty().isNotEmpty()) {
|
||||
val found = list.find {
|
||||
it.model is MessageModel && it.model.chatMessage.messageId == event.chatMessage?.messageId
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
|
|
@ -63,6 +64,23 @@
|
|||
app:layout_constraintEnd_toEndOf="@id/image"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/transfer_progress"
|
||||
android:layout_width="@dimen/chat_bubble_grid_image_size"
|
||||
android:layout_height="@dimen/chat_bubble_grid_image_size"
|
||||
android:padding="18dp"
|
||||
android:indeterminate="false"
|
||||
android:progress="@{model.transferProgress}"
|
||||
android:max="100"
|
||||
android:visibility="@{model.transferProgress == -1 || model.transferProgress >= 100 ? View.GONE : View.VISIBLE}"
|
||||
app:trackColor="?attr/color_main1_100"
|
||||
app:indicatorColor="?attr/color_main1_500"
|
||||
app:layout_constraintTop_toTopOf="@id/image"
|
||||
app:layout_constraintBottom_toBottomOf="@id/image"
|
||||
app:layout_constraintStart_toStartOf="@id/image"
|
||||
app:layout_constraintEnd_toEndOf="@id/image"
|
||||
tools:progress="40" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
Loading…
Add table
Reference in a new issue