From 055ed35fa6567b617053d57096cc5a86d8b34476 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:30:00 +0100 Subject: [PATCH] Reducing line count by removing some line breaks --- .../java/im/vector/app/core/event/GetTimelineEventUseCase.kt | 5 +---- .../polls/detail/domain/GetEndedPollEventIdUseCase.kt | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) 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() }