Don't show recipient names in Inbox, Archive, Spam and Trash folders

Some people assign e.g. the 'Sent' role to the Inbox. In that case we need to treat the folder like the Inbox rather than the Sent folder when it comes to deciding whether or not to display the recipient address in the message list.
This commit is contained in:
cketti 2020-10-31 17:57:58 +01:00
parent 90c94dc38e
commit 7d7c198e73

View file

@ -5,6 +5,10 @@ import com.fsck.k9.Account
object DisplayAddressHelper {
fun shouldShowRecipients(account: Account, folderId: Long): Boolean {
return when (folderId) {
account.inboxFolderId -> false
account.archiveFolderId -> false
account.spamFolderId -> false
account.trashFolderId -> false
account.sentFolderId -> true
account.draftsFolderId -> true
account.outboxFolderId -> true