summaryrefslogtreecommitdiff
path: root/alot/db/sort.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-31 09:51:36 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-31 09:51:36 +0100
commitc83da858d191c663894bef6d192d9bb489b082f5 (patch)
treeae86ac2856d560c0a7c1c44acdf0c7249e8bb975 /alot/db/sort.py
parentcf6d0be6502b790f91c7f4e0f1738ef8381fab70 (diff)
db: use symbolic constants for sort orders
Diffstat (limited to 'alot/db/sort.py')
-rw-r--r--alot/db/sort.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/alot/db/sort.py b/alot/db/sort.py
new file mode 100644
index 00000000..b93c814d
--- /dev/null
+++ b/alot/db/sort.py
@@ -0,0 +1,14 @@
+# Copyright (C) 2012 Anton Khirnov <anton@khirnov.net>
+# This file is released under the GNU GPL, version 3 or a later revision.
+# For further details see the COPYING file
+
+import notmuch2
+
+ORDER = notmuch2.Database.SORT
+
+NAME = {
+ 'oldest_first' : ORDER.OLDEST_FIRST,
+ 'newest_first' : ORDER.NEWEST_FIRST,
+ 'message_id' : ORDER.MESSAGE_ID,
+ 'unsorted' : ORDER.UNSORTED,
+}