mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-400 Fix missed wtf.Config occurrances
This commit is contained in:
@@ -3,16 +3,14 @@ package clocks
|
||||
import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type ClockCollection struct {
|
||||
Clocks []Clock
|
||||
}
|
||||
|
||||
func (clocks *ClockCollection) Sorted() []Clock {
|
||||
if "chronological" == wtf.Config.UString("wtf.mods.clocks.sort", "alphabetical") {
|
||||
func (clocks *ClockCollection) Sorted(sortOrder string) []Clock {
|
||||
if sortOrder == "chronological" {
|
||||
clocks.SortedChronologically()
|
||||
} else {
|
||||
clocks.SortedAlphabetically()
|
||||
|
||||
@@ -34,7 +34,7 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.display(widget.clockColl.Sorted(), widget.dateFormat, widget.timeFormat)
|
||||
widget.display(widget.clockColl.Sorted(widget.settings.sort), widget.dateFormat, widget.timeFormat)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
Reference in New Issue
Block a user