aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/notmuch.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/notmuch/notmuch.go')
-rw-r--r--worker/notmuch/notmuch.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/worker/notmuch/notmuch.go b/worker/notmuch/notmuch.go
new file mode 100644
index 00000000..5610cac0
--- /dev/null
+++ b/worker/notmuch/notmuch.go
@@ -0,0 +1,24 @@
+//go:build notmuch
+// +build notmuch
+
+package notmuch
+
+import "git.sr.ht/~rjarry/aerc/models"
+
+var tagToFlag = map[string]models.Flags{
+ "unread": models.SeenFlag,
+ "replied": models.AnsweredFlag,
+ "flagged": models.FlaggedFlag,
+}
+
+var flagToTag = map[models.Flags]string{
+ models.SeenFlag: "unread",
+ models.AnsweredFlag: "replied",
+ models.FlaggedFlag: "flagged",
+}
+
+var flagToInvert = map[models.Flags]bool{
+ models.SeenFlag: true,
+ models.AnsweredFlag: false,
+ models.FlaggedFlag: false,
+}