mirror of
https://github.com/element-hq/element-android
synced 2024-10-25 04:06:50 +03:00
Catch Throwable on not only Exception
This commit is contained in:
parent
4acc308864
commit
95639927a7
1 changed files with 3 additions and 12 deletions
|
@ -188,10 +188,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
}
|
||||
// Inform the SDK that the room is displayed
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
session.onRoomDisplayed(initialState.roomId)
|
||||
} catch (_: Throwable) {
|
||||
}
|
||||
tryOrNull { session.onRoomDisplayed(initialState.roomId) }
|
||||
}
|
||||
callManager.addPstnSupportListener(this)
|
||||
callManager.checkForPSTNSupportIfNeeded()
|
||||
|
@ -1162,19 +1159,13 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
|
||||
private fun handleRejectInvite() {
|
||||
viewModelScope.launch {
|
||||
try {
|
||||
room.leave(null)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
tryOrNull { room.leave(null) }
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleAcceptInvite() {
|
||||
viewModelScope.launch {
|
||||
try {
|
||||
room.join()
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
tryOrNull { room.join() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue