diff --git a/vector/src/main/java/im/vector/app/core/event/GetTimelineEventUseCase.kt b/vector/src/main/java/im/vector/app/core/event/GetTimelineEventUseCase.kt index 9745701589..c1a226a47b 100644 --- a/vector/src/main/java/im/vector/app/core/event/GetTimelineEventUseCase.kt +++ b/vector/src/main/java/im/vector/app/core/event/GetTimelineEventUseCase.kt @@ -30,10 +30,7 @@ class GetTimelineEventUseCase @Inject constructor( ) { fun execute(roomId: String, eventId: String): Flow { - return activeSessionHolder - .getActiveSession() - .roomService() - .getRoom(roomId) + return activeSessionHolder.getActiveSession().roomService().getRoom(roomId) ?.timelineService() ?.getTimelineEventLive(eventId) ?.asFlow() diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/polls/detail/domain/GetEndedPollEventIdUseCase.kt b/vector/src/main/java/im/vector/app/features/roomprofile/polls/detail/domain/GetEndedPollEventIdUseCase.kt index 539d81e3e0..aa1ba1b274 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/polls/detail/domain/GetEndedPollEventIdUseCase.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/polls/detail/domain/GetEndedPollEventIdUseCase.kt @@ -28,9 +28,7 @@ class GetEndedPollEventIdUseCase @Inject constructor( fun execute(roomId: String, startPollEventId: String): String? { val result = runCatching { - activeSessionHolder.getActiveSession() - .roomService() - .getRoom(roomId) + activeSessionHolder.getActiveSession().roomService().getRoom(roomId) ?.timelineService() ?.getTimelineEventsRelatedTo(RelationType.REFERENCE, startPollEventId) ?.find { it.root.isPollEnd() }