Skip to content

Commit

Permalink
Remove more println logs in adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Bats committed Oct 27, 2024
1 parent 325e773 commit 5c4b00e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ internal fun Flow<ContestUpdate>.processByTimeCut(
if (oldCut != newCut) {
it.runsAfterEvent.values
.filter { run -> (run.time > oldCut) != (run.time > newCut) }
.also { println("Updated runs: ${it.map { run -> run.id }}")}
// .also { println("Updated runs: ${it.map { run -> run.id }}")}
.forEach { run -> emit(run, newCut) }
}
}
is CommentaryMessagesUpdate -> emit(it.lastEvent)
}
}.onEach { if (it is RunUpdate) println("${it.newInfo.id} ${it.newInfo.time} ${it.newInfo.result}") }
}.onEach { /* if (it is RunUpdate) println("${it.newInfo.id} ${it.newInfo.time} ${it.newInfo.result}") */ }

internal fun removeFrozenSubmissionsResults(flow: Flow<ContestUpdate>): Flow<ContestUpdate> =
flow.processByTimeCut(
Expand All @@ -47,4 +47,4 @@ internal fun removeFrozenSubmissionsResults(flow: Flow<ContestUpdate>): Flow<Con
internal fun removeAfterEndSubmissions(flow: Flow<ContestUpdate>): Flow<ContestUpdate> =
flow.processByTimeCut(
timeCut = { it?.contestLength ?: Duration.INFINITE },
) { it.copy(isHidden = true) }
) { it.copy(isHidden = true) }

0 comments on commit 5c4b00e

Please sign in to comment.