rvv041 - Code Optimizations
addressBookDescrip changed to addressBookAbdescrip DB.hs and CLI.hs source files affected
This commit is contained in:
parent
772025e317
commit
ddbd08d474
2 changed files with 7 additions and 7 deletions
|
@ -666,7 +666,7 @@ listDrawAB sel ab =
|
||||||
if sel
|
if sel
|
||||||
then withAttr abSelAttr (txt $ " " <> s )
|
then withAttr abSelAttr (txt $ " " <> s )
|
||||||
else txt $ " " <> s
|
else txt $ " " <> s
|
||||||
in selStr $ addressBookDescrip (entityVal ab)
|
in selStr $ addressBookAbdescrip (entityVal ab)
|
||||||
|
|
||||||
customAttr :: A.AttrName
|
customAttr :: A.AttrName
|
||||||
customAttr = L.listSelectedAttr <> A.attrName "custom"
|
customAttr = L.listSelectedAttr <> A.attrName "custom"
|
||||||
|
@ -1054,7 +1054,7 @@ appEvent (BT.VtyEvent e) = do
|
||||||
BT.modify $
|
BT.modify $
|
||||||
set msg $
|
set msg $
|
||||||
"Address copied to Clipboard from >>\n" ++
|
"Address copied to Clipboard from >>\n" ++
|
||||||
T.unpack (addressBookDescrip (entityVal a)) ++ "->\n" ++
|
T.unpack (addressBookAbdescrip (entityVal a)) ++ "->\n" ++
|
||||||
T.unpack (addressBookAbaddress (entityVal a)) ++ "!"
|
T.unpack (addressBookAbaddress (entityVal a)) ++ "!"
|
||||||
BT.modify $ set displayBox MsgDisplay
|
BT.modify $ set displayBox MsgDisplay
|
||||||
_ -> do
|
_ -> do
|
||||||
|
@ -1078,7 +1078,7 @@ appEvent (BT.VtyEvent e) = do
|
||||||
BT.modify $ set abCurAdrs (addressBookAbaddress (entityVal a))
|
BT.modify $ set abCurAdrs (addressBookAbaddress (entityVal a))
|
||||||
BT.modify $
|
BT.modify $
|
||||||
set abForm $
|
set abForm $
|
||||||
mkNewABForm (AdrBookEntry (addressBookDescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
|
mkNewABForm (AdrBookEntry (addressBookAbdescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
|
||||||
BT.modify $ set dialogBox AdrBookUpdForm
|
BT.modify $ set dialogBox AdrBookUpdForm
|
||||||
_ -> do
|
_ -> do
|
||||||
BT.modify $ set dialogBox Blank
|
BT.modify $ set dialogBox Blank
|
||||||
|
@ -1089,7 +1089,7 @@ appEvent (BT.VtyEvent e) = do
|
||||||
BT.modify $ set abCurAdrs (addressBookAbaddress (entityVal a))
|
BT.modify $ set abCurAdrs (addressBookAbaddress (entityVal a))
|
||||||
BT.modify $
|
BT.modify $
|
||||||
set abForm $
|
set abForm $
|
||||||
mkNewABForm (AdrBookEntry (addressBookDescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
|
mkNewABForm (AdrBookEntry (addressBookAbdescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
|
||||||
BT.modify $ set dialogBox AdrBookDelForm
|
BT.modify $ set dialogBox AdrBookDelForm
|
||||||
_ -> do
|
_ -> do
|
||||||
BT.modify $ set dialogBox Blank
|
BT.modify $ set dialogBox Blank
|
||||||
|
@ -1103,7 +1103,7 @@ appEvent (BT.VtyEvent e) = do
|
||||||
Just (_, a) -> do
|
Just (_, a) -> do
|
||||||
BT.modify $ set abTxt $ T.pack $
|
BT.modify $ set abTxt $ T.pack $
|
||||||
" Descr: " ++
|
" Descr: " ++
|
||||||
T.unpack (addressBookDescrip (entityVal a)) ++
|
T.unpack (addressBookAbdescrip (entityVal a)) ++
|
||||||
"\n Address: " ++
|
"\n Address: " ++
|
||||||
T.unpack (addressBookAbaddress (entityVal a))
|
T.unpack (addressBookAbaddress (entityVal a))
|
||||||
BT.modify $ set displayBox AdrBookEntryDisplay
|
BT.modify $ set displayBox AdrBookEntryDisplay
|
||||||
|
|
|
@ -248,7 +248,7 @@ share
|
||||||
deriving Show Eq
|
deriving Show Eq
|
||||||
AddressBook
|
AddressBook
|
||||||
network ZcashNetDB
|
network ZcashNetDB
|
||||||
descrip T.Text
|
abdescrip T.Text
|
||||||
abaddress T.Text
|
abaddress T.Text
|
||||||
UniqueABA abaddress
|
UniqueABA abaddress
|
||||||
deriving Show Eq
|
deriving Show Eq
|
||||||
|
@ -1500,7 +1500,7 @@ updateAdrsInAdrBook pool d a ia = do
|
||||||
PS.retryOnBusy $
|
PS.retryOnBusy $
|
||||||
flip PS.runSqlPool pool $ do
|
flip PS.runSqlPool pool $ do
|
||||||
update $ \ab -> do
|
update $ \ab -> do
|
||||||
set ab [AddressBookDescrip =. val d, AddressBookAbaddress =. val a]
|
set ab [AddressBookAbdescrip =. val d, AddressBookAbaddress =. val a]
|
||||||
where_ $ ab ^. AddressBookAbaddress ==. val ia
|
where_ $ ab ^. AddressBookAbaddress ==. val ia
|
||||||
|
|
||||||
-- | Get one AddrssBook record using the Address as a key
|
-- | Get one AddrssBook record using the Address as a key
|
||||||
|
|
Loading…
Reference in a new issue