diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt index cea845a490..e35a4fdce1 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt @@ -1046,7 +1046,7 @@ class TimelineViewModel @AssistedInject constructor( val event = try { room.reportingService().reportContent(action.eventId, -100, action.reason) RoomDetailViewEvents.ActionSuccess(action) - } catch (failure: Exception) { + } catch (failure: Throwable) { RoomDetailViewEvents.ActionFailure(action, failure) } _viewEvents.post(event) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt index 2e0a6ae347..ca64a0f991 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt @@ -271,7 +271,7 @@ class RoomListViewModel @AssistedInject constructor( viewModelScope.launch { try { room.roomPushRuleService().setRoomNotificationState(action.notificationState) - } catch (failure: Exception) { + } catch (failure: Throwable) { _viewEvents.post(RoomListViewEvents.Failure(failure)) } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt index 5ecf9d6d96..425f309202 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt @@ -289,7 +289,7 @@ class HomeRoomListViewModel @AssistedInject constructor( viewModelScope.launch { try { room.roomPushRuleService().setRoomNotificationState(action.notificationState) - } catch (failure: Exception) { + } catch (failure: Throwable) { _viewEvents.post(HomeRoomListViewEvents.Failure(failure)) } }