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()
|
goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
|
||||||
|
listViewModel.updateParticipants()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,16 +59,16 @@ class DevicesListViewModel(private val chatRoom: ChatRoom) : ViewModel() {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
chatRoom.addListener(listener)
|
chatRoom.addListener(listener)
|
||||||
updateParticipants()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCleared() {
|
override fun onCleared() {
|
||||||
participants.value.orEmpty().forEach(DevicesListGroupData::destroy)
|
participants.value.orEmpty().forEach(DevicesListGroupData::destroy)
|
||||||
chatRoom.removeListener(listener)
|
chatRoom.removeListener(listener)
|
||||||
|
|
||||||
super.onCleared()
|
super.onCleared()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateParticipants() {
|
fun updateParticipants() {
|
||||||
participants.value.orEmpty().forEach(DevicesListGroupData::destroy)
|
participants.value.orEmpty().forEach(DevicesListGroupData::destroy)
|
||||||
|
|
||||||
val list = arrayListOf<DevicesListGroupData>()
|
val list = arrayListOf<DevicesListGroupData>()
|
||||||
|
|
Loading…
Reference in a new issue