Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions alot/buffers/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,18 @@ def render(self, size, focus=False):

if settings.get('auto_remove_unread'):
logging.debug('Tbuffer: auto remove unread tag from msg?')

msg = self.get_selected_message()
mid = msg.get_message_id()
focus_pos = self.body.get_focus()[1]
summary_pos = (self.body.get_focus()[1][0], (0,))
cursor_on_non_summary = (focus_pos != summary_pos)

if self.message_count > 1:
focus_pos = self.body.get_focus()[1]
summary_pos = (self.body.get_focus()[1][0], (0,))
cursor_on_non_summary = (focus_pos != summary_pos)
else:
# Immediately remove unread tag from single-message threads
cursor_on_non_summary = True

if cursor_on_non_summary:
if mid not in self._auto_unread_dont_touch_mids:
if 'unread' in msg.get_tags():
Expand Down