From 221cf915acaa1965c595e5550ae6fcf619ff8575 Mon Sep 17 00:00:00 2001 From: Noah Date: Wed, 20 Mar 2024 00:02:52 +0100 Subject: [PATCH] fix-mainline-starting-with-black-to-move --- lib/src/view/analysis/tree_view.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/src/view/analysis/tree_view.dart b/lib/src/view/analysis/tree_view.dart index c4bf2ec87e..27de785ea7 100644 --- a/lib/src/view/analysis/tree_view.dart +++ b/lib/src/view/analysis/tree_view.dart @@ -118,6 +118,7 @@ class _InlineTreeViewState extends ConsumerState { nodes: root.children, shouldShowComments: shouldShowComments, inMainline: true, + startMainline: true, startSideline: false, initialPath: UciPath.empty, ); @@ -169,6 +170,7 @@ class _InlineTreeViewState extends ConsumerState { required ViewNode parent, required IList nodes, required bool inMainline, + required bool startMainline, required bool startSideline, required bool shouldShowComments, required UciPath initialPath, @@ -191,6 +193,7 @@ class _InlineTreeViewState extends ConsumerState { key: currentMove ? currentMoveKey : null, shouldShowComments: shouldShowComments, isSideline: !inMainline, + startMainline: startMainline, startSideline: startSideline, endSideline: !inMainline && firstChild.children.isEmpty, ), @@ -213,6 +216,7 @@ class _InlineTreeViewState extends ConsumerState { nodes: [nodes[i]].lockUnsafe, shouldShowComments: shouldShowComments, inMainline: false, + startMainline: false, startSideline: true, initialPath: initialPath, ), @@ -227,6 +231,7 @@ class _InlineTreeViewState extends ConsumerState { nodes: [nodes[i]].lockUnsafe, shouldShowComments: shouldShowComments, inMainline: false, + startMainline: false, startSideline: true, initialPath: initialPath, ), @@ -242,6 +247,7 @@ class _InlineTreeViewState extends ConsumerState { nodes: firstChild.children, shouldShowComments: shouldShowComments, inMainline: inMainline, + startMainline: false, startSideline: false, initialPath: newPath, ), @@ -278,6 +284,7 @@ class InlineMove extends ConsumerWidget { required this.isCurrentMove, required this.isSideline, super.key, + this.startMainline = false, this.startSideline = false, this.endSideline = false, }); @@ -289,6 +296,7 @@ class InlineMove extends ConsumerWidget { final bool shouldShowComments; final bool isCurrentMove; final bool isSideline; + final bool startMainline; final bool startSideline; final bool endSideline; @@ -323,7 +331,7 @@ class InlineMove extends ConsumerWidget { '${(ply / 2).ceil()}.', style: indexTextStyle, ) - : (startSideline + : ((startMainline || startSideline) ? Text( '${(ply / 2).ceil()}...', style: indexTextStyle,