From 2534612c5929782f4bf9f27df65d1d024d6947ca Mon Sep 17 00:00:00 2001
From: Moritz Poldrack <git@moritz.sh>
Date: Fri, 29 Jul 2022 21:20:35 +0200
Subject: [PATCH] lint: remove unused structs and functions (unused)

Signed-off-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
---
 widgets/compose.go       |  7 -------
 widgets/dirlist.go       | 13 -------------
 worker/notmuch/events.go |  6 +-----
 3 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/widgets/compose.go b/widgets/compose.go
index b9528e0..5e8a808 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 984fc01..e50567e 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 b354227..94b27fd 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{}