summary refs log tree commit diff stats
path: root/worker/notmuch/message.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-09-27 19:00:58 +0200
committerReto Brunner <reto@labrat.space>2020-09-27 19:00:58 +0200
commitc48f228fa5ac57984af78e19713929224874aa8b (patch)
tree05f2164bea0a12effb9ac0a3594bd4340d67cf07 /worker/notmuch/message.go
parentdadc9bf2b3e992851d2539d6f459a4f29001e686 (diff)
downloadaerc-c48f228fa5ac57984af78e19713929224874aa8b.tar.gz
notmuch: rename method to SetFlag
Diffstat (limited to 'worker/notmuch/message.go')
-rw-r--r--worker/notmuch/message.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/worker/notmuch/message.go b/worker/notmuch/message.go
index 3d3ed0c..82d00f3 100644
--- a/worker/notmuch/message.go
+++ b/worker/notmuch/message.go
@@ -64,9 +64,9 @@ func (m *Message) NewBodyPartReader(requestedParts []int) (io.Reader, error) {
 	return lib.FetchEntityPartReader(msg, requestedParts)
 }
 
-// SetOneFlag adds or removes a single flag from the message.
+// SetFlag adds or removes a flag from the message.
 // Notmuch doesn't support all the flags, and for those this errors.
-func (m *Message) SetOneFlag(flag models.Flag, enable bool) error {
+func (m *Message) SetFlag(flag models.Flag, enable bool) error {
 	// Translate the flag into a notmuch tag, ignoring no-op flags.
 	var tag string
 	switch flag {
@@ -120,12 +120,12 @@ func (m *Message) SetOneFlag(flag models.Flag, enable bool) error {
 
 // MarkAnswered either adds or removes the "replied" tag from the message.
 func (m *Message) MarkAnswered(answered bool) error {
-	return m.SetOneFlag(models.AnsweredFlag, answered)
+	return m.SetFlag(models.AnsweredFlag, answered)
 }
 
 // MarkRead either adds or removes the maildir.FlagSeen flag from the message.
 func (m *Message) MarkRead(seen bool) error {
-	return m.SetOneFlag(models.SeenFlag, seen)
+	return m.SetFlag(models.SeenFlag, seen)
 }
 
 // tags returns the notmuch tags of a message