summaryrefslogtreecommitdiff
path: root/alot/buffers
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/buffers
parentcf6d0be6502b790f91c7f4e0f1738ef8381fab70 (diff)
db: use symbolic constants for sort orders
Diffstat (limited to 'alot/buffers')
-rw-r--r--alot/buffers/search.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/alot/buffers/search.py b/alot/buffers/search.py
index c1650db4..c7b92920 100644
--- a/alot/buffers/search.py
+++ b/alot/buffers/search.py
@@ -8,6 +8,7 @@ import urwid
from notmuch2 import NotmuchError
from .buffer import Buffer
+from ..db.sort import NAME as SORT_NAME
from ..settings.const import settings
from ..widgets.search import ThreadlineWidget
@@ -103,8 +104,8 @@ class SearchBuffer(Buffer):
self.dbman = ui.dbman
self.ui = ui
self.querystring = initialquery
- default_order = settings.get('search_threads_sort_order')
- self.sort_order = sort_order or default_order
+ default_order = SORT_NAME[settings.get('search_threads_sort_order')]
+ self.sort_order = sort_order or default_order
self.rebuild()
super().__init__()