Skip to content

Commit

Permalink
show preferred content type if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Van der Jeugt committed Dec 16, 2018
1 parent 30001f7 commit 5c42efe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion alot/widgets/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ def _get_multiparts(self):
for ctype, text
in self._message.get_body_parts()]

self._current_part = 0
preferred = 'text/plain' if settings.get(
'prefer_plaintext') else 'text/html'
prefs = [i for i, e in enumerate(self._multiparts)
if e[0] == preferred]
self._current_part = prefs[0] if prefs else 0

return self._multiparts

Expand Down

0 comments on commit 5c42efe

Please sign in to comment.