Change Sort Constants

This commit is contained in:
2023-08-23 09:58:04 -05:00
parent c62767a5ef
commit b3e09780fb
2 changed files with 14 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ import (
)
// TimerList represents a list of timer.txt timer entries.
// It is usually loasded from a whole timer.txt file.
// It is usually loaded from a whole timer.txt file.
type TimerList struct {
timers []*Timer
sortFlag int
@@ -202,7 +202,7 @@ func (timerlist *TimerList) AddTimer(timer *Timer) {
// AddTimers adds all passed in timers to the list, sorts the list, then updates the Timer.Id values.
func (timerlist *TimerList) AddTimers(timers []*Timer) {
timerlist.timers = append(timerlist.timers, timers...)
timerlist.Sort(SORT_START_DATE_ASC)
timerlist.Sort(SortStartDateAsc)
}
func (timerlist *TimerList) Combine(other *TimerList) { timerlist.AddTimers(other.timers) }