1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Pick up previous selection of boards checkboxes on edit

This commit is contained in:
Elliott Stoneham 2016-09-11 20:15:37 +01:00
parent 79e3f1be47
commit d655f1b42f

View file

@ -288,6 +288,10 @@ func getBoards(config trelloConfig) (boards []trelloBoard, err error) {
defer res.Body.Close()
dec := json.NewDecoder(res.Body)
err = dec.Decode(&b)
if err != nil {
fmt.Println(err)
return nil, err
}
// we only show open, team boards (not personal)
for _, b := range b {
@ -296,13 +300,15 @@ func getBoards(config trelloConfig) (boards []trelloBoard, err error) {
}
}
if err != nil {
fmt.Println(err)
return nil, err
}
for bx := range boards {
for bx, bd := range boards {
for _, cd := range config.Boards {
if bd.ID == cd.ID {
boards[bx].Included = cd.Included // to pick up the previous selection or not
goto foundID
}
}
boards[bx].Included = true // include boards by default
foundID:
}
return boards, nil