aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-07-29 21:20:35 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-04 21:57:48 +0200
commit2534612c5929782f4bf9f27df65d1d024d6947ca (patch)
tree84fc23d4ab7cedbd02e0c6f30b9e94adba87eef7
parent77a00de741d8fb791bf1e9aab34ff9940385e31a (diff)
downloadaerc-2534612c5929782f4bf9f27df65d1d024d6947ca.tar.gz
lint: remove unused structs and functions (unused)
Signed-off-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--widgets/compose.go7
-rw-r--r--widgets/dirlist.go13
-rw-r--r--worker/notmuch/events.go6
3 files changed, 1 insertions, 25 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index b9528e0e..5e8a8081 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -995,13 +995,6 @@ func (he *headerEditor) storeValue() {
}
}
-// setValue overwrites the current value of the header editor and flushes it
-// to the underlying header
-func (he *headerEditor) setValue(val string) {
- he.input.Set(val)
- he.storeValue()
-}
-
func (he *headerEditor) Draw(ctx *ui.Context) {
name := textproto.CanonicalMIMEHeaderKey(he.name)
// Extra character to put a blank cell between the header and the input
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 984fc01c..e50567ea 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -16,7 +16,6 @@ import (
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/lib"
"git.sr.ht/~rjarry/aerc/lib/format"
- libsort "git.sr.ht/~rjarry/aerc/lib/sort"
"git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
@@ -521,18 +520,6 @@ func findString(slice []string, str string) int {
return -1
}
-func (dirlist *DirectoryList) getSortCriteria() []*types.SortCriterion {
- if len(dirlist.UiConfig().Sort) == 0 {
- return nil
- }
- criteria, err := libsort.GetSortCriteria(dirlist.UiConfig().Sort)
- if err != nil {
- logging.Errorf("getSortCriteria failed: %v", err)
- return nil
- }
- return criteria
-}
-
func countRUE(msgStore *lib.MessageStore) (recent, unread int) {
for _, msg := range msgStore.Messages {
if msg == nil {
diff --git a/worker/notmuch/events.go b/worker/notmuch/events.go
index b3542279..94b27fd7 100644
--- a/worker/notmuch/events.go
+++ b/worker/notmuch/events.go
@@ -5,8 +5,4 @@ package notmuch
type eventType interface{}
-type event struct{}
-
-type updateDirCounts struct {
- event
-}
+type updateDirCounts struct{}