-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add board prefs missing value fallback
- Loading branch information
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,10 @@ class BoardPrefs with _$BoardPrefs implements Serializable { | |
required bool coordinates, | ||
required bool pieceAnimation, | ||
required bool showMaterialDifference, | ||
@JsonKey( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
veloce
Author
Contributor
|
||
defaultValue: ClockPosition.right, | ||
unknownEnumValue: ClockPosition.right, | ||
) | ||
required ClockPosition clockPosition, | ||
@JsonKey( | ||
defaultValue: PieceShiftMethod.either, | ||
|
@@ -131,7 +135,10 @@ class BoardPrefs with _$BoardPrefs implements Serializable { | |
/// Whether to enable shape drawings on the board for games and puzzles. | ||
@JsonKey(defaultValue: true) required bool enableShapeDrawings, | ||
@JsonKey(defaultValue: true) required bool magnifyDraggedPiece, | ||
@JsonKey(defaultValue: DragTargetKind.circle) | ||
@JsonKey( | ||
defaultValue: DragTargetKind.circle, | ||
unknownEnumValue: DragTargetKind.circle, | ||
) | ||
required DragTargetKind dragTargetKind, | ||
@JsonKey( | ||
defaultValue: ShapeColor.green, | ||
|
So that's what caused the settings being deleted after the update? Maybe that's something we should add to https://github.com/lichess-org/mobile/blob/main/docs/coding_style.md to at least reduce the chance of it happening in the future?