added dbName field to ProgState

This commit is contained in:
Jonathan Lamothe 2020-03-11 03:09:47 -04:00
parent f9085832f4
commit ffa241c1f7

View File

@ -50,6 +50,7 @@ module Mtlstats.Types (
-- ** ProgState Lenses -- ** ProgState Lenses
database, database,
progMode, progMode,
dbName,
inputBuffer, inputBuffer,
scrollOffset, scrollOffset,
-- ** ProgMode Lenses -- ** ProgMode Lenses
@ -233,6 +234,8 @@ data ProgState = ProgState
-- ^ The data to be saved -- ^ The data to be saved
, _progMode :: ProgMode , _progMode :: ProgMode
-- ^ The program's mode -- ^ The program's mode
, _dbName :: String
-- ^ The name of the database file
, _inputBuffer :: String , _inputBuffer :: String
-- ^ Buffer for user input -- ^ Buffer for user input
, _scrollOffset :: Int , _scrollOffset :: Int
@ -781,6 +784,7 @@ newProgState :: ProgState
newProgState = ProgState newProgState = ProgState
{ _database = newDatabase { _database = newDatabase
, _progMode = TitleScreen , _progMode = TitleScreen
, _dbName = ""
, _inputBuffer = "" , _inputBuffer = ""
, _scrollOffset = 0 , _scrollOffset = 0
} }