Update secured chat room devices list security level after validation call
This commit is contained in:
parent
1f3c17b818
commit
7a9c9bc449
2 changed files with 8 additions and 2 deletions
|
@ -66,4 +66,10 @@ class DevicesFragment : SecureFragment<ChatRoomDevicesFragmentBinding>() {
|
|||
goBack()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
listViewModel.updateParticipants()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>()
|
||||
|
|
Loading…
Reference in a new issue