ui: after exiting --register, select that account
This commit is contained in:
parent
472b0aee75
commit
ebc4022888
@ -4,7 +4,9 @@
|
|||||||
{-# LANGUAGE RecordWildCards #-}
|
{-# LANGUAGE RecordWildCards #-}
|
||||||
|
|
||||||
module Hledger.UI.AccountsScreen
|
module Hledger.UI.AccountsScreen
|
||||||
(screen)
|
(screen
|
||||||
|
,initAccountsScreen
|
||||||
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Control.Lens ((^.))
|
import Control.Lens ((^.))
|
||||||
|
|||||||
@ -101,13 +101,12 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do
|
|||||||
$ filter (regexMatches apat) $ journalAccountNames j
|
$ filter (regexMatches apat) $ journalAccountNames j
|
||||||
-- Initialising the accounts screen is awkward, requiring
|
-- Initialising the accounts screen is awkward, requiring
|
||||||
-- another temporary AppState value..
|
-- another temporary AppState value..
|
||||||
ascr = AS.screen
|
|
||||||
ascr' = aScreen $
|
ascr' = aScreen $
|
||||||
(sInitFn ascr) d
|
AS.initAccountsScreen (Just acct) d -- acct will be selected
|
||||||
AppState{
|
AppState{
|
||||||
aopts=uopts'
|
aopts=uopts'
|
||||||
,ajournal=j
|
,ajournal=j
|
||||||
,aScreen=ascr
|
,aScreen=AS.screen
|
||||||
,aPrevScreens=[]
|
,aPrevScreens=[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user