update comments

This commit is contained in:
Dan Anglin 2023-04-23 00:35:08 +01:00
parent 4f621b0280
commit b16fe8eb60
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638

View file

@ -21,7 +21,6 @@ const (
addPageName string = "add"
)
// UI does some magical stuff.
type UI struct {
*tview.Application
@ -50,12 +49,12 @@ func NewUI() UI {
return u
}
// closeBoard closes the BoltDB database.
// closeBoard closes the board.
func (u *UI) closeBoard() {
_ = u.board.Close()
}
// init the UI.
// init initialises the UI.
func (u *UI) init() {
u.pages.AddPage(mainPageName, u.flex, true, true)
@ -82,6 +81,7 @@ func (u *UI) init() {
u.SetRoot(u.pages, true)
}
// initAddInputModal initialises the add input modal.
func (u *UI) initAddInputModal() {
doneFunc := func(text string, success bool) {
if success {
@ -111,7 +111,7 @@ func (u *UI) initQuitModal() {
SetDoneFunc(quitDoneFunc)
}
// newCard creates a new card and saves it to the database.
// newCard creates and saves a new card to the database.
func (u *UI) newCard(title, content string) error {
args := board.CardArgs{
NewTitle: title,
@ -127,7 +127,7 @@ func (u *UI) newCard(title, content string) error {
return nil
}
// openBoard opens the kanban project.
// openBoard opens the kanban board.
func (u *UI) openBoard(path string) error {
b, err := board.Open(path)
if err != nil {
@ -143,7 +143,7 @@ func (u *UI) openBoard(path string) error {
return nil
}
// refresh the UI.
// refresh refreshes the UI.
func (u *UI) refresh() error {
statusList, err := u.board.StatusList()
if err != nil {