mirror of
				https://github.com/taigrr/wtf
				synced 2025-01-18 04:03:14 -08:00 
			
		
		
		
	
						commit
						9e7045ca52
					
				@ -1,7 +1,5 @@
 | 
				
			|||||||
package todo
 | 
					package todo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import ()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
type List struct {
 | 
					type List struct {
 | 
				
			||||||
	Items []*Item
 | 
						Items []*Item
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -33,10 +31,7 @@ func (list *List) CheckedItems() []*Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func (list *List) Delete() {
 | 
					func (list *List) Delete() {
 | 
				
			||||||
	list.Items = append(list.Items[:list.selected], list.Items[list.selected+1:]...)
 | 
						list.Items = append(list.Items[:list.selected], list.Items[list.selected+1:]...)
 | 
				
			||||||
 | 
						list.Prev()
 | 
				
			||||||
	if list.selected >= len(list.Items) {
 | 
					 | 
				
			||||||
		list.selected--
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (list *List) Demote() {
 | 
					func (list *List) Demote() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user