diff --git a/src/Zenith/GUI.hs b/src/Zenith/GUI.hs index 1cf132b..27d21fb 100644 --- a/src/Zenith/GUI.hs +++ b/src/Zenith/GUI.hs @@ -1256,7 +1256,10 @@ handleEvent wenv node model evt = CheckValidAddress a -> [Model $ model & abAddressValid .~ isRecipientValid a] CheckValidDescrip a -> [Model $ model & abDescripValid .~ isValidString a] - ShowAdrBook -> [Model $ model & showAdrBook .~ True & menuPopup .~ False] + ShowAdrBook -> + if null (model ^. abaddressList) + then [Model $ model & newAdrBkEntry .~ True & menuPopup .~ False] + else [Model $ model & showAdrBook .~ True & menuPopup .~ False] CloseAdrBook -> [Model $ model & showAdrBook .~ False] NewAdrBkEntry -> [Model $ model & newAdrBkEntry .~ True & menuPopup .~ False]