diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-02-06 14:17:54 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-02-06 17:11:05 +0100 |
commit | 8b787ec521849cb854154857196734b7a298611e (patch) | |
tree | e06edfd31da7636ba7689531266984d8b85e4118 | |
parent | fbdde65a7f5eab74d2334481cee52ba429910c22 (diff) |
db/message: drop a useless getter
-rw-r--r-- | alot/db/message.py | 10 | ||||
-rw-r--r-- | alot/widgets/thread.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/alot/db/message.py b/alot/db/message.py index 67a16e1e..ad9de9f4 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -25,6 +25,10 @@ class Message: It it uses a :class:`~alot.db.DBManager` for cached manipulation and lazy lookups. """ + + """the :class:`~alot.db.Thread` this Message belongs to""" + thread = None + def __init__(self, dbman, msg, thread): """ :param dbman: db manager that is used for further lookups @@ -37,7 +41,7 @@ class Message: self._dbman = dbman self._id = msg.get_message_id() self._thread_id = msg.get_thread_id() - self._thread = thread + self.thread = thread try: self._datetime = datetime.fromtimestamp(msg.get_date()) except ValueError: @@ -123,10 +127,6 @@ class Message: """returns tags attached to this message as list of strings""" return sorted(self._tags) - def get_thread(self): - """returns the :class:`~alot.db.Thread` this msg belongs to""" - return self._thread - def get_datestring(self): """ returns reformated datestring for this message. diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 61799aa3..d87a881a 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -42,7 +42,7 @@ class MessageSummaryWidget(urwid.WidgetWrap): cols.append(txt) if settings.get('msg_summary_hides_threadwide_tags'): - thread_tags = message.get_thread().get_tags(intersection=True) + thread_tags = message.thread.get_tags(intersection=True) outstanding_tags = set(message.get_tags()).difference(thread_tags) tag_widgets = sorted(TagWidget(t, attr, focus_att) for t in outstanding_tags) |