Skip to content

Commit bba1492

Browse files
committed
React better to victory results
1 parent 8552390 commit bba1492

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/faforever/client/replay/ReplayDetailController.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,10 @@ private GameOutcome calculateGameResult(Map<PlayerBean, GamePlayerStatsBean> sta
479479
.map(gameOutcome -> (gameOutcome == GameOutcome.CONFLICTING) ? GameOutcome.UNKNOWN : gameOutcome)
480480
.map(gameOutcome -> (gameOutcome == GameOutcome.MUTUAL_DRAW) ? GameOutcome.DRAW : gameOutcome)
481481
.collect(Collectors.groupingBy(gameOutcome -> gameOutcome, Collectors.counting()));
482+
483+
if (outcomeCounts.containsKey(GameOutcome.VICTORY)) {
484+
return GameOutcome.VICTORY;
485+
}
482486

483487
return outcomeCounts.entrySet()
484488
.stream()

0 commit comments

Comments
 (0)