mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 04:13:11 +03:00
imp: ui: at --debug 2+, also log events
This commit is contained in:
parent
68b243e670
commit
9fc92cefe4
@ -33,7 +33,7 @@ import Hledger.UI.Theme
|
|||||||
import Hledger.UI.UIOptions
|
import Hledger.UI.UIOptions
|
||||||
import Hledger.UI.UITypes
|
import Hledger.UI.UITypes
|
||||||
import Hledger.UI.UIState (uiState, getDepth)
|
import Hledger.UI.UIState (uiState, getDepth)
|
||||||
import Hledger.UI.UIUtils (dlogUiTrace)
|
import Hledger.UI.UIUtils (dlogUiTrace, dlogUiTraceM)
|
||||||
import Hledger.UI.MenuScreen
|
import Hledger.UI.MenuScreen
|
||||||
import Hledger.UI.AccountsScreen
|
import Hledger.UI.AccountsScreen
|
||||||
import Hledger.UI.BalancesheetScreen
|
import Hledger.UI.BalancesheetScreen
|
||||||
@ -68,7 +68,7 @@ main = do
|
|||||||
|
|
||||||
runBrickUi :: UIOpts -> Journal -> IO ()
|
runBrickUi :: UIOpts -> Journal -> IO ()
|
||||||
runBrickUi uopts0@UIOpts{uoCliOpts=copts@CliOpts{inputopts_=_iopts,reportspec_=rspec@ReportSpec{_rsReportOpts=ropts}}} j =
|
runBrickUi uopts0@UIOpts{uoCliOpts=copts@CliOpts{inputopts_=_iopts,reportspec_=rspec@ReportSpec{_rsReportOpts=ropts}}} j =
|
||||||
dlogUiTrace "========= runBrickUi" $ do
|
dlogUiTrace "==== runBrickUi" $ do
|
||||||
let
|
let
|
||||||
today = copts^.rsDay
|
today = copts^.rsDay
|
||||||
|
|
||||||
@ -240,6 +240,7 @@ brickApp mtheme = App {
|
|||||||
|
|
||||||
uiHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
|
uiHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
|
||||||
uiHandle ev = do
|
uiHandle ev = do
|
||||||
|
dlogUiTraceM $ "==== " ++ show ev
|
||||||
ui <- get
|
ui <- get
|
||||||
case aScreen ui of
|
case aScreen ui of
|
||||||
MS _ -> msHandle ev
|
MS _ -> msHandle ev
|
||||||
|
Loading…
Reference in New Issue
Block a user