Skip to content

Commit 137b27d

Browse files
committed
Fix relaxed most solved
1 parent 65c7700 commit 137b27d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/Results/MostActivePlayer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __construct(
1414
public null|CountryCode $playerCountry,
1515
public int $solvedPuzzlesCount,
1616
public int $totalPiecesCount,
17-
public int $totalSeconds,
17+
public null|int $totalSeconds,
1818
public bool $isPrivate,
1919
) {
2020
}
@@ -26,7 +26,7 @@ public function __construct(
2626
* player_country: null|string,
2727
* solved_puzzles_count: int,
2828
* total_pieces_count: int,
29-
* total_seconds: int,
29+
* total_seconds: null|int,
3030
* is_private: bool,
3131
* } $row
3232
*/

templates/components/MostActiveSoloPlayers.html.twig

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,16 @@
6969
<small>{{ 'solo_solved'|trans }}</small> {{ most_active_player.solvedPuzzlesCount }}&times;<br>
7070

7171
<small class="text-muted">
72-
{{ 'pieces_count'|trans({'%count%': most_active_player.totalPiecesCount|format_number([], 'decimal', 'default', 'cs')})|raw }}<br>
73-
74-
{% if most_active_player.totalSeconds|daysElapsed > 0 %}
75-
{{ most_active_player.totalSeconds|daysElapsed }}d
72+
{{ 'pieces_count'|trans({'%count%': most_active_player.totalPiecesCount|format_number([], 'decimal', 'default', 'cs')})|raw }}
73+
{% if most_active_player.totalSeconds is not null %}
74+
<br>
75+
{% if most_active_player.totalSeconds|daysElapsed > 0 %}
76+
{{ most_active_player.totalSeconds|daysElapsed }}d
77+
{% endif %}
78+
{{ most_active_player.totalSeconds|hoursElapsed(false) }}h
79+
{{ most_active_player.totalSeconds|minutesElapsed }}m
80+
{{ most_active_player.totalSeconds|secondsElapsed }}s
7681
{% endif %}
77-
{{ most_active_player.totalSeconds|hoursElapsed(false) }}h
78-
{{ most_active_player.totalSeconds|minutesElapsed }}m
79-
{{ most_active_player.totalSeconds|secondsElapsed }}s
8082
</small>
8183
</td>
8284
</tr>

0 commit comments

Comments
 (0)