Fixed group chat events icon

This commit is contained in:
Sylvain Berfini 2025-04-28 11:26:35 +02:00
parent 056abd629f
commit 6e9c6d1b33
5 changed files with 43 additions and 8 deletions

View file

@ -124,15 +124,22 @@ class EventModel
R.drawable.pencil_simple
}
EventLog.Type.ConferenceCreated,
EventLog.Type.ConferenceParticipantAdded,
EventLog.Type.ConferenceParticipantRemoved,
EventLog.Type.ConferenceParticipantDeviceAdded,
EventLog.Type.ConferenceParticipantDeviceRemoved -> {
R.drawable.door
}
EventLog.Type.ConferenceParticipantAdded -> {
R.drawable.user_circle_plus
}
EventLog.Type.ConferenceParticipantRemoved -> {
R.drawable.user_circle_minus
}
EventLog.Type.ConferenceParticipantSetAdmin -> {
R.drawable.user_circle_check
}
EventLog.Type.ConferenceParticipantUnsetAdmin -> {
R.drawable.user_circle_dashed
}
else -> R.drawable.user_circle
},
coreContext.context.theme

View file

@ -110,7 +110,7 @@ class ConversationInfoViewModel
R.string.conversation_info_participant_added_to_conversation_toast,
getParticipant(eventLog)
)
showFormattedGreenToast(message, R.drawable.user_circle)
showFormattedGreenToast(message, R.drawable.user_circle_plus)
computeParticipantsList()
infoChangedEvent.postValue(Event(true))
@ -123,7 +123,7 @@ class ConversationInfoViewModel
R.string.conversation_info_participant_removed_from_conversation_toast,
getParticipant(eventLog)
)
showFormattedGreenToast(message, R.drawable.user_circle)
showFormattedGreenToast(message, R.drawable.user_circle_minus)
computeParticipantsList()
infoChangedEvent.postValue(Event(true))
@ -134,18 +134,19 @@ class ConversationInfoViewModel
Log.i(
"$TAG A participant has been given/removed administration rights for group [${chatRoom.subject}]"
)
val message = if (eventLog.type == EventLog.Type.ConferenceParticipantSetAdmin) {
AppUtils.getFormattedString(
if (eventLog.type == EventLog.Type.ConferenceParticipantSetAdmin) {
val message = AppUtils.getFormattedString(
R.string.conversation_info_participant_has_been_granted_admin_rights_toast,
getParticipant(eventLog)
)
showFormattedGreenToast(message, R.drawable.user_circle_check)
} else {
AppUtils.getFormattedString(
val message = AppUtils.getFormattedString(
R.string.conversation_info_participant_no_longer_has_admin_rights_toast,
getParticipant(eventLog)
)
showFormattedGreenToast(message, R.drawable.user_circle_dashed)
}
showFormattedGreenToast(message, R.drawable.user_circle)
computeParticipantsList()
}

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M96.26,37A8,8 0,0 1,102 27.29a104.11,104.11 0,0 1,52 0,8 8,0 0,1 -2,15.75 8.15,8.15 0,0 1,-2 -0.26,88 88,0 0,0 -44,0A8,8 0,0 1,96.26 37ZM33.35,110a8,8 0,0 0,9.85 -5.57,87.88 87.88,0 0,1 22,-38.09A8,8 0,0 0,53.8 55.14a103.92,103.92 0,0 0,-26 45A8,8 0,0 0,33.35 110ZM150,213.22a88,88 0,0 1,-44 0,8 8,0 0,0 -4,15.49 104.11,104.11 0,0 0,52 0,8 8,0 0,0 -4,-15.49ZM212.8,104.45a8,8 0,0 0,15.42 -4.28,104 104,0 0,0 -26,-45 8,8 0,1 0,-11.41 11.21A88.14,88.14 0,0 1,212.79 104.45ZM228.24,155.84a103.68,103.68 0,0 1,-30.68 49.47A8,8 0,0 1,185.07 203a64,64 0,0 0,-114.14 0,8 8,0 0,1 -12.48,2.32 103.74,103.74 0,0 1,-30.68 -49.49,8 8,0 0,1 15.42,-4.27 87.58,87.58 0,0 0,19 34.88,79.57 79.57,0 0,1 36.1,-28.77 48,48 0,1 1,59.38 0,79.57 79.57,0 0,1 36.1,28.77 87.58,87.58 0,0 0,19 -34.88,8 8,0 1,1 15.42,4.28ZM128,152a32,32 0,1 0,-32 -32A32,32 0,0 0,128 152Z"
android:fillColor="#4e6074"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M168,56a8,8 0,0 1,8 -8h48a8,8 0,0 1,0 16L176,64A8,8 0,0 1,168 56ZM226.08,93.33a103.93,103.93 0,1 1,-80.76 -67.89,8 8,0 0,1 -2.64,15.78A88.07,88.07 0,0 0,40 128a87.62,87.62 0,0 0,22.24 58.41A79.66,79.66 0,0 1,98.3 157.66a48,48 0,1 1,59.4 0,79.66 79.66,0 0,1 36.06,28.75A88,88 0,0 0,211 98.67a8,8 0,0 1,15.09 -5.34ZM128,152a32,32 0,1 0,-32 -32A32,32 0,0 0,128 152ZM128,216a87.57,87.57 0,0 0,53.92 -18.5,64 64,0 0,0 -107.84,0A87.57,87.57 0,0 0,128 216Z"
android:fillColor="#4e6074"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M168,56a8,8 0,0 1,8 -8h16L192,32a8,8 0,0 1,16 0L208,48h16a8,8 0,0 1,0 16L208,64L208,80a8,8 0,0 1,-16 0L192,64L176,64A8,8 0,0 1,168 56ZM230.56,110.68a103.92,103.92 0,1 1,-85.24 -85.24,8 8,0 0,1 -2.64,15.78A88.07,88.07 0,0 0,40 128a87.62,87.62 0,0 0,22.24 58.41A79.66,79.66 0,0 1,98.3 157.66a48,48 0,1 1,59.4 0,79.66 79.66,0 0,1 36.06,28.75A87.62,87.62 0,0 0,216 128a88.85,88.85 0,0 0,-1.22 -14.68,8 8,0 1,1 15.78,-2.64ZM128,152a32,32 0,1 0,-32 -32A32,32 0,0 0,128 152ZM128,216a87.57,87.57 0,0 0,53.92 -18.5,64 64,0 0,0 -107.84,0A87.57,87.57 0,0 0,128 216Z"
android:fillColor="#4e6074"/>
</vector>