;dev:ui: note issue with regenerateScreens

This commit is contained in:
Simon Michael 2025-09-12 09:58:17 +01:00
parent 5d1bb5c2ad
commit e87d9e3ce3

View File

@ -367,7 +367,10 @@ resetScreens d ui@UIState{astartupopts=origopts, ajournal=j, aScreen=s,aPrevScre
-- then regenerate the content of all screens in the stack
-- (using the ui state's current options), preserving the screen navigation history.
-- Note, does not save the reporting date.
--
-- Currently this does not properly regenerate the transaction screen or error screen,
-- which depend on state from their parent(s). (Eg rsHandle generates TS's nts from its list items.)
-- As a workaround we can additionally exit and reenter those screens; but this is fragile.
regenerateScreens :: Journal -> Day -> UIState -> UIState
regenerateScreens j d ui@UIState{aopts=opts, aScreen=s,aPrevScreens=ss} =
ui{ajournal=j, aScreen=screenUpdate opts d j s, aPrevScreens=map (screenUpdate opts d j) ss}