lichess-org / mobile

Lichess mobile app v2
GNU General Public License v3.0
1.35k stars 196 forks source link

refactor: make PgnTreeView independent of the AnalysisController #1076

Closed tom-anders closed 1 month ago

tom-anders commented 1 month ago

Note: Most of the file should be moved to something like src/lib/view/pgn/tree_view.dart, but I have not done that yet to make reviewing easier. I'd push a commit that does this once the rest of the code looks good to you

tom-anders commented 1 month ago

Two new commits:

1) Move the tree view to a dedicated file as discussed 2) Fix the "show Comments" and "Toggle move annotations" toggles not taking immediate effect (mentioned on discord here: https://discord.com/channels/280713822073913354/807722604478988348/1295982127741145182)

veloce commented 1 month ago

Nice! Before I forget, I noticed another bug with the new tree: hiding a variation not anymore works if you open the context menu on any child but the first one.

tom-anders commented 1 month ago

Ah good point, let's keep this PR open then, I'll push a fix and a regression test for that

tom-anders commented 1 month ago

Fixed :)