1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Merge pull request #125 from jeangovil/i101

clean up todo list
This commit is contained in:
Chris Cummer 2018-06-01 23:29:04 -07:00 committed by GitHub
commit 9e7045ca52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,5 @@
package todo
import ()
type List struct {
Items []*Item
@ -33,10 +31,7 @@ func (list *List) CheckedItems() []*Item {
func (list *List) Delete() {
list.Items = append(list.Items[:list.selected], list.Items[list.selected+1:]...)
if list.selected >= len(list.Items) {
list.selected--
}
list.Prev()
}
func (list *List) Demote() {