From a92af549fe3297775b4ca08bf2e98bdff1a1b30c Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Mon, 23 Apr 2018 10:18:33 -0700 Subject: [PATCH] Remove the Index prop from Todo#Item. Don't need it --- todo/item.go | 5 ++--- todo/list.go | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/todo/item.go b/todo/item.go index 4f996749..172b95d0 100644 --- a/todo/item.go +++ b/todo/item.go @@ -1,7 +1,6 @@ package todo -import ( -) +import () type Item struct { Checked bool @@ -11,7 +10,7 @@ type Item struct { func (item *Item) CheckMark() string { if item.Checked { - return "x" + return Config.UString("wtf.mods.todo.checkedIcon", "x") } else { return " " } diff --git a/todo/list.go b/todo/list.go index d581c4a9..097305c1 100644 --- a/todo/list.go +++ b/todo/list.go @@ -1,6 +1,8 @@ package todo -import ("fmt") +import ( + "fmt" +) type List struct { Items []*Item @@ -63,7 +65,7 @@ func (list *List) Len() int { } func (list *List) Less(i, j int) bool { - return list.Items[i].Index < list.Items[j].Index + return list.Items[i].Text < list.Items[j].Text } func (list *List) Swap(i, j int) {