Update secured chat room devices list security level after validation call

This commit is contained in:
Sylvain Berfini 2021-11-22 15:10:02 +01:00
parent 1f3c17b818
commit 7a9c9bc449
2 changed files with 8 additions and 2 deletions

View file

@ -66,4 +66,10 @@ class DevicesFragment : SecureFragment<ChatRoomDevicesFragmentBinding>() {
goBack()
}
}
override fun onResume() {
super.onResume()
listViewModel.updateParticipants()
}
}

View file

@ -59,16 +59,16 @@ class DevicesListViewModel(private val chatRoom: ChatRoom) : ViewModel() {
init {
chatRoom.addListener(listener)
updateParticipants()
}
override fun onCleared() {
participants.value.orEmpty().forEach(DevicesListGroupData::destroy)
chatRoom.removeListener(listener)
super.onCleared()
}
private fun updateParticipants() {
fun updateParticipants() {
participants.value.orEmpty().forEach(DevicesListGroupData::destroy)
val list = arrayListOf<DevicesListGroupData>()