Reducing line count by removing some line breaks

This commit is contained in:
Maxime NATUREL 2023-02-03 17:30:00 +01:00
parent a55698c5f4
commit 055ed35fa6
2 changed files with 2 additions and 7 deletions

View File

@ -30,10 +30,7 @@ class GetTimelineEventUseCase @Inject constructor(
) { ) {
fun execute(roomId: String, eventId: String): Flow<TimelineEvent> { fun execute(roomId: String, eventId: String): Flow<TimelineEvent> {
return activeSessionHolder return activeSessionHolder.getActiveSession().roomService().getRoom(roomId)
.getActiveSession()
.roomService()
.getRoom(roomId)
?.timelineService() ?.timelineService()
?.getTimelineEventLive(eventId) ?.getTimelineEventLive(eventId)
?.asFlow() ?.asFlow()

View File

@ -28,9 +28,7 @@ class GetEndedPollEventIdUseCase @Inject constructor(
fun execute(roomId: String, startPollEventId: String): String? { fun execute(roomId: String, startPollEventId: String): String? {
val result = runCatching { val result = runCatching {
activeSessionHolder.getActiveSession() activeSessionHolder.getActiveSession().roomService().getRoom(roomId)
.roomService()
.getRoom(roomId)
?.timelineService() ?.timelineService()
?.getTimelineEventsRelatedTo(RelationType.REFERENCE, startPollEventId) ?.getTimelineEventsRelatedTo(RelationType.REFERENCE, startPollEventId)
?.find { it.root.isPollEnd() } ?.find { it.root.isPollEnd() }