Add order to tasks and lists
This commit is contained in:
@@ -14,6 +14,7 @@ type List struct {
|
||||
ShowCompl int `json:"showCompl"`
|
||||
ShowNotes int `json:"showNotes"`
|
||||
Hidden int `json:"hidden"`
|
||||
Max int `json:"max"`
|
||||
}
|
||||
|
||||
func New(r *http.Request) (*List, error) {
|
||||
@@ -47,6 +48,11 @@ func (l *List) SetHideList(state bool) {
|
||||
set(state, &l.Hidden)
|
||||
}
|
||||
|
||||
func (l *List) NextIndex() int {
|
||||
l.Max += 1
|
||||
return l.Max
|
||||
}
|
||||
|
||||
func set(b bool, i *int) {
|
||||
*i = 1
|
||||
if !b {
|
||||
|
||||
Reference in New Issue
Block a user