ui: Do not reset cost and value flags on reload.
This commit is contained in:
		
							parent
							
								
									307bd9366d
								
							
						
					
					
						commit
						55f42c3d1e
					
				| @ -173,11 +173,7 @@ tsHandle ui@UIState{aScreen=s@TransactionScreen{tsTransaction=(i,t) | |||||||
|           ej <- liftIO $ journalReload copts |           ej <- liftIO $ journalReload copts | ||||||
|           case ej of |           case ej of | ||||||
|             Left err -> continue $ screenEnter d errorScreen{esError=err} ui |             Left err -> continue $ screenEnter d errorScreen{esError=err} ui | ||||||
|             Right j' -> do |             Right j' -> continue $ regenerateScreens j' d ui | ||||||
|               continue $ |  | ||||||
|                 regenerateScreens j' d $ |  | ||||||
|                 clearCostValue $ |  | ||||||
|                 ui |  | ||||||
|         VtyEvent (EvKey (KChar 'I') []) -> continue $ uiCheckBalanceAssertions d (toggleIgnoreBalanceAssertions ui) |         VtyEvent (EvKey (KChar 'I') []) -> continue $ uiCheckBalanceAssertions d (toggleIgnoreBalanceAssertions ui) | ||||||
| 
 | 
 | ||||||
|         -- for toggles that may change the current/prev/next transactions, |         -- for toggles that may change the current/prev/next transactions, | ||||||
|  | |||||||
| @ -105,11 +105,6 @@ toggleEmpty ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportspec_=rsp | |||||||
|   where |   where | ||||||
|     toggleEmpty ropts = ropts{empty_=not $ empty_ ropts} |     toggleEmpty ropts = ropts{empty_=not $ empty_ ropts} | ||||||
| 
 | 
 | ||||||
| -- | Show primary amounts, not cost or value. |  | ||||||
| clearCostValue :: UIState -> UIState |  | ||||||
| clearCostValue ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportspec_=rspec@ReportSpec{rsOpts=ropts}}}} = |  | ||||||
|   ui{aopts=uopts{cliopts_=copts{reportspec_=rspec{rsOpts=ropts{cost_ = NoCost, value_ = Nothing}}}}} |  | ||||||
| 
 |  | ||||||
| -- | Toggle between showing the primary amounts or costs. | -- | Toggle between showing the primary amounts or costs. | ||||||
| toggleCost :: UIState -> UIState | toggleCost :: UIState -> UIState | ||||||
| toggleCost ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportspec_=rspec@ReportSpec{rsOpts=ropts}}}} = | toggleCost ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportspec_=rspec@ReportSpec{rsOpts=ropts}}}} = | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user