mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 02:37:12 +03:00
ui: replace odd-looking pattern
This commit is contained in:
parent
1db9b018f1
commit
1c3233cc0f
@ -113,8 +113,9 @@ toggleTree :: UIState -> UIState
|
|||||||
toggleTree ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}}} =
|
toggleTree ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}}} =
|
||||||
ui{aopts=uopts{cliopts_=copts{reportopts_=toggleTreeMode ropts}}}
|
ui{aopts=uopts{cliopts_=copts{reportopts_=toggleTreeMode ropts}}}
|
||||||
where
|
where
|
||||||
toggleTreeMode ropts@ReportOpts{accountlistmode_=ALTree} = ropts{accountlistmode_=ALFlat}
|
toggleTreeMode ropts
|
||||||
toggleTreeMode ropts = ropts{accountlistmode_=ALTree}
|
| accountlistmode_ ropts == ALTree = ropts{accountlistmode_=ALFlat}
|
||||||
|
| otherwise = ropts{accountlistmode_=ALTree}
|
||||||
|
|
||||||
-- | Toggle between historical balances and period balances.
|
-- | Toggle between historical balances and period balances.
|
||||||
toggleHistorical :: UIState -> UIState
|
toggleHistorical :: UIState -> UIState
|
||||||
|
Loading…
Reference in New Issue
Block a user