Skip to content

Commit

Permalink
Hide difficulty while replaying puzzles
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudyDino committed Feb 16, 2025
1 parent 274c09d commit 8ab1a95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/src/model/puzzle/puzzle_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class PuzzleContext with _$PuzzleContext {

/// List of solved puzzle results if available.
IList<PuzzleRound>? rounds,

@Default(false) bool replaying,
}) = _PuzzleContext;
}

Expand Down Expand Up @@ -140,6 +142,7 @@ class PuzzleService {
userId: userId,
glicko: null,
rounds: null,
replaying: true,
),
);
} else {
Expand Down
3 changes: 2 additions & 1 deletion lib/src/view/puzzle/puzzle_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ class _BottomBar extends ConsumerWidget {
return PlatformBottomBar(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
if (initialPuzzleContext.userId != null &&
if (!initialPuzzleContext.replaying &&
initialPuzzleContext.userId != null &&
!isDailyPuzzle &&
puzzleState.mode != PuzzleMode.view)
_DifficultySelector(
Expand Down

0 comments on commit 8ab1a95

Please sign in to comment.