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