Fix incorrectly caught exception
This commit is contained in:
parent
657796c8b5
commit
98ce9899ff
@ -1046,7 +1046,7 @@ class TimelineViewModel @AssistedInject constructor(
|
|||||||
val event = try {
|
val event = try {
|
||||||
room.reportingService().reportContent(action.eventId, -100, action.reason)
|
room.reportingService().reportContent(action.eventId, -100, action.reason)
|
||||||
RoomDetailViewEvents.ActionSuccess(action)
|
RoomDetailViewEvents.ActionSuccess(action)
|
||||||
} catch (failure: Exception) {
|
} catch (failure: Throwable) {
|
||||||
RoomDetailViewEvents.ActionFailure(action, failure)
|
RoomDetailViewEvents.ActionFailure(action, failure)
|
||||||
}
|
}
|
||||||
_viewEvents.post(event)
|
_viewEvents.post(event)
|
||||||
|
@ -271,7 +271,7 @@ class RoomListViewModel @AssistedInject constructor(
|
|||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
try {
|
try {
|
||||||
room.roomPushRuleService().setRoomNotificationState(action.notificationState)
|
room.roomPushRuleService().setRoomNotificationState(action.notificationState)
|
||||||
} catch (failure: Exception) {
|
} catch (failure: Throwable) {
|
||||||
_viewEvents.post(RoomListViewEvents.Failure(failure))
|
_viewEvents.post(RoomListViewEvents.Failure(failure))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ class HomeRoomListViewModel @AssistedInject constructor(
|
|||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
try {
|
try {
|
||||||
room.roomPushRuleService().setRoomNotificationState(action.notificationState)
|
room.roomPushRuleService().setRoomNotificationState(action.notificationState)
|
||||||
} catch (failure: Exception) {
|
} catch (failure: Throwable) {
|
||||||
_viewEvents.post(HomeRoomListViewEvents.Failure(failure))
|
_viewEvents.post(HomeRoomListViewEvents.Failure(failure))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user