mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-24 21:18:31 +00:00
Do not list ourselves in group conversation participants if we have left, reworked disabled/encrypted conversation info box
This commit is contained in:
parent
d718cff486
commit
e5f227ba35
3 changed files with 57 additions and 57 deletions
|
|
@ -556,21 +556,23 @@ class ConversationInfoViewModel @UiThread constructor() : AbstractConversationVi
|
||||||
participantsList.add(model)
|
participantsList.add(model)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add ourselves at the end of the list
|
if (!chatRoom.isReadOnly) {
|
||||||
val meParticipant = chatRoom.me
|
// Add ourselves at the end of the list
|
||||||
if (meParticipant != null) {
|
val meParticipant = chatRoom.me
|
||||||
val model = ParticipantModel(
|
if (meParticipant != null) {
|
||||||
meParticipant.address,
|
val model = ParticipantModel(
|
||||||
selfAdmin,
|
meParticipant.address,
|
||||||
isParticipantAdmin = selfAdmin,
|
selfAdmin,
|
||||||
showMenu = false,
|
isParticipantAdmin = selfAdmin,
|
||||||
isParticipantMyself = true,
|
showMenu = false,
|
||||||
onMenuClicked = { view, model ->
|
isParticipantMyself = true,
|
||||||
// openMenu
|
onMenuClicked = { view, model ->
|
||||||
showParticipantAdminPopupMenuEvent.postValue(Event(Pair(view, model)))
|
// openMenu
|
||||||
}
|
showParticipantAdminPopupMenuEvent.postValue(Event(Pair(view, model)))
|
||||||
)
|
}
|
||||||
participantsList.add(model)
|
)
|
||||||
|
participantsList.add(model)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
android:background="@drawable/shape_squircle_main2_200_chat_event_border"
|
android:background="@drawable/shape_squircle_main2_200_chat_event_border"
|
||||||
app:layout_constraintWidth_max="300dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|
@ -26,32 +27,31 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/secured_icon"
|
android:id="@+id/secured_icon"
|
||||||
android:layout_width="@dimen/small_icon_size"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginStart="15dp"
|
||||||
android:paddingTop="3dp"
|
android:paddingTop="3dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/lock_simple_bold"
|
android:src="@drawable/lock_simple_bold"
|
||||||
app:tint="@color/blue_info_500"
|
app:tint="@color/blue_info_500"
|
||||||
app:layout_constraintTop_toTopOf="@id/secured_title"
|
app:layout_constraintTop_toTopOf="@id/secured_title"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/secured_title"
|
app:layout_constraintBottom_toBottomOf="@id/secured_subtitle"
|
||||||
app:layout_constraintEnd_toStartOf="@id/secured_title"/>
|
app:layout_constraintStart_toStartOf="@id/secured_background"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/default_text_style_700"
|
style="@style/default_text_style_700"
|
||||||
android:id="@+id/secured_title"
|
android:id="@+id/secured_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
android:text="@string/conversation_end_to_end_encrypted_event_title"
|
android:text="@string/conversation_end_to_end_encrypted_event_title"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textColor="@color/blue_info_500"
|
android:textColor="@color/blue_info_500"
|
||||||
app:layout_constraintWidth_max="280dp"
|
app:layout_constraintStart_toEndOf="@id/secured_icon"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@id/secured_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
|
@ -59,17 +59,16 @@
|
||||||
android:id="@+id/secured_subtitle"
|
android:id="@+id/secured_subtitle"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="5dp"
|
android:layout_marginStart="8dp"
|
||||||
android:paddingEnd="5dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:paddingBottom="5dp"
|
android:layout_marginEnd="15dp"
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/conversation_end_to_end_encrypted_event_subtitle"
|
android:text="@string/conversation_end_to_end_encrypted_event_subtitle"
|
||||||
android:textColor="?attr/color_grey_400"
|
android:textColor="?attr/color_grey_400"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintWidth_max="300dp"
|
app:layout_constraintStart_toEndOf="@id/secured_icon"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@id/secured_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/secured_title"
|
||||||
app:layout_constraintTop_toBottomOf="@id/secured_title"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
android:background="@drawable/shape_squircle_main2_200_chat_event_border"
|
android:background="@drawable/shape_squircle_main2_200_chat_event_border"
|
||||||
app:layout_constraintWidth_max="300dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|
@ -26,32 +27,31 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/disabled_icon"
|
android:id="@+id/disabled_icon"
|
||||||
android:layout_width="@dimen/small_icon_size"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginStart="15dp"
|
||||||
android:paddingTop="3dp"
|
android:paddingTop="3dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/lock_simple_open_bold"
|
android:src="@drawable/lock_simple_open_bold"
|
||||||
app:tint="@color/orange_warning_600"
|
app:tint="@color/orange_warning_600"
|
||||||
app:layout_constraintTop_toTopOf="@id/disabled_title"
|
app:layout_constraintTop_toTopOf="@id/disabled_title"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/disabled_title"
|
app:layout_constraintBottom_toBottomOf="@id/disabled_subtitle"
|
||||||
app:layout_constraintEnd_toStartOf="@id/disabled_title"/>
|
app:layout_constraintStart_toStartOf="@id/disabled_background"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/default_text_style_700"
|
style="@style/default_text_style_700"
|
||||||
android:id="@+id/disabled_title"
|
android:id="@+id/disabled_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
android:text="@string/conversation_warning_disabled_because_not_secured_title"
|
android:text="@string/conversation_warning_disabled_because_not_secured_title"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textColor="@color/orange_warning_600"
|
android:textColor="@color/orange_warning_600"
|
||||||
app:layout_constraintWidth_max="280dp"
|
app:layout_constraintStart_toEndOf="@id/disabled_icon"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@id/disabled_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
|
@ -59,17 +59,16 @@
|
||||||
android:id="@+id/disabled_subtitle"
|
android:id="@+id/disabled_subtitle"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="5dp"
|
android:layout_marginStart="8dp"
|
||||||
android:paddingEnd="5dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:paddingBottom="5dp"
|
android:layout_marginEnd="15dp"
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/conversation_warning_disabled_because_not_secured_subtitle"
|
android:text="@string/conversation_warning_disabled_because_not_secured_subtitle"
|
||||||
android:textColor="?attr/color_grey_400"
|
android:textColor="?attr/color_grey_400"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintWidth_max="300dp"
|
app:layout_constraintStart_toEndOf="@id/disabled_icon"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@id/disabled_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/disabled_title"
|
||||||
app:layout_constraintTop_toBottomOf="@id/disabled_title"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue