diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-02-06 14:40:05 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-02-06 17:11:05 +0100 |
commit | 72ed7d40ac68d7e91f41e94fbcf6cb7a3e28433a (patch) | |
tree | 08395b57acf97a9aa83bb545645241259b9b28fb /alot/widgets | |
parent | 8b787ec521849cb854154857196734b7a298611e (diff) |
db: drop useless getters
Diffstat (limited to 'alot/widgets')
-rw-r--r-- | alot/widgets/search.py | 4 | ||||
-rw-r--r-- | alot/widgets/thread.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/alot/widgets/search.py b/alot/widgets/search.py index 51048394..a4d22e82 100644 --- a/alot/widgets/search.py +++ b/alot/widgets/search.py @@ -178,12 +178,12 @@ def prepare_authors_string(thread): def prepare_subject_string(thread): - return thread.get_subject() or ' ' + return thread.subject or ' ' def prepare_content_string(thread): msgs = sorted(thread.get_messages().keys(), - key=lambda msg: msg.get_date(), reverse=True) + key=lambda msg: msg.date, reverse=True) lastcontent = ' '.join(m.get_body_text() for m in msgs) lastcontent = lastcontent.replace('^>.*$', '') return lastcontent diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index d87a881a..47034bfe 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -332,7 +332,7 @@ class ThreadTree(Tree): """ def __init__(self, thread): self._thread = thread - self.root = thread.get_toplevel_messages()[0].get_message_id() + self.root = thread.get_toplevel_messages()[0].id self._parent_of = {} self._first_child_of = {} self._last_child_of = {} @@ -342,13 +342,13 @@ class ThreadTree(Tree): def accumulate(msg, odd=True): """recursively read msg and its replies""" - mid = msg.get_message_id() + mid = msg.id self._message[mid] = MessageTree(msg, odd) odd = not odd last = None self._first_child_of[mid] = None for reply in thread.get_replies_to(msg): - rid = reply.get_message_id() + rid = reply.id if self._first_child_of[mid] is None: self._first_child_of[mid] = rid self._parent_of[rid] = mid @@ -361,7 +361,7 @@ class ThreadTree(Tree): last = None for msg in thread.get_toplevel_messages(): - mid = msg.get_message_id() + mid = msg.id self._prev_sibling_of[mid] = last self._next_sibling_of[last] = mid accumulate(msg) @@ -389,4 +389,4 @@ class ThreadTree(Tree): @staticmethod def position_of_messagetree(mt): - return mt._message.get_message_id() + return mt._message.id |