Loading legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +3 −3 Original line number Diff line number Diff line Loading @@ -141,8 +141,8 @@ open class MessageList : private var messageListWasDisplayed = false private var viewSwitcher: ViewSwitcher? = null private val isShowAccountChip: Boolean get() = messageListFragment?.isShowAccountChip ?: true private val isShowAccountIndicator: Boolean get() = messageListFragment?.isShowAccountIndicator ?: true public override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Loading Loading @@ -1106,7 +1106,7 @@ open class MessageList : } else { val fragment = MessageViewContainerFragment.newInstance( reference = messageReference, showAccountChip = isShowAccountChip, isShowAccountIndicator = isShowAccountIndicator, ) supportFragmentManager.commitNow { replace(R.id.message_view_container, fragment, FRAGMENT_TAG_MESSAGE_VIEW_CONTAINER) Loading legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListAppearance.kt +4 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ data class MessageListAppearance( val showContactPicture: Boolean, val showingThreadedList: Boolean, val backGroundAsReadIndicator: Boolean, val showAccountChip: Boolean, /** * Whether to show an account color indicator on the left side of the message item. */ val showAccountIndicator: Boolean, val density: UiDensity, ) legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt +2 −2 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ class MessageListFragment : maybeHideFloatingActionButton() } val isShowAccountChip: Boolean val isShowAccountIndicator: Boolean get() = isUnifiedFolders || !isSingleAccountMode override fun onAttach(context: Context) { Loading Loading @@ -785,7 +785,7 @@ class MessageListFragment : showingThreadedList = showingThreadedList, backGroundAsReadIndicator = generalSettingsManager .getConfig().display.visualSettings.isUseBackgroundAsUnreadIndicator, showAccountChip = isShowAccountChip, showAccountIndicator = isShowAccountIndicator, density = K9.messageListDensity, ) Loading legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/item/MessageViewHolder.kt +5 −5 Original line number Diff line number Diff line Loading @@ -89,10 +89,10 @@ class MessageViewHolder( threadCount = displayThreadCount, ) if (appearance.showAccountChip) { val accountChipDrawable = chipView.drawable.mutate() DrawableCompat.setTint(accountChipDrawable, account.profile.color) chipView.setImageDrawable(accountChipDrawable) if (appearance.showAccountIndicator) { val accountIndicatorDrawable = chipView.drawable.mutate() DrawableCompat.setTint(accountIndicatorDrawable, account.profile.color) chipView.setImageDrawable(accountIndicatorDrawable) } if (appearance.stars) { Loading Loading @@ -315,7 +315,7 @@ class MessageViewHolder( holder.contactPictureView.isVisible = false } holder.chipView.isVisible = appearance.showAccountChip holder.chipView.isVisible = appearance.showAccountIndicator // 1 preview line is needed even if it is set to 0, because subject is part of the same text view holder.previewView.maxLines = max(appearance.previewLines, 1) Loading legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.kt +4 −4 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ class MessageTopView( private var isShowingProgress = false private var showPicturesButtonClicked = false private var showAccountChip = false private var showAccountIndicator = false private var messageCryptoPresenter: MessageCryptoPresenter? = null Loading @@ -83,8 +83,8 @@ class MessageTopView( hideHeaderView() } fun setShowAccountChip(showAccountChip: Boolean) { this.showAccountChip = showAccountChip fun setShowAccountIndicator(showAccountIndicator: Boolean) { this.showAccountIndicator = showAccountIndicator } private fun setShowPicturesButtonListener() { Loading Loading @@ -197,7 +197,7 @@ class MessageTopView( } fun setHeaders(message: Message?, account: LegacyAccountDto?, showStar: Boolean) { messageHeaderView.populate(message, account, showStar, showAccountChip) messageHeaderView.populate(message, account, showStar, showAccountIndicator) messageHeaderView.visibility = VISIBLE } Loading Loading
legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +3 −3 Original line number Diff line number Diff line Loading @@ -141,8 +141,8 @@ open class MessageList : private var messageListWasDisplayed = false private var viewSwitcher: ViewSwitcher? = null private val isShowAccountChip: Boolean get() = messageListFragment?.isShowAccountChip ?: true private val isShowAccountIndicator: Boolean get() = messageListFragment?.isShowAccountIndicator ?: true public override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Loading Loading @@ -1106,7 +1106,7 @@ open class MessageList : } else { val fragment = MessageViewContainerFragment.newInstance( reference = messageReference, showAccountChip = isShowAccountChip, isShowAccountIndicator = isShowAccountIndicator, ) supportFragmentManager.commitNow { replace(R.id.message_view_container, fragment, FRAGMENT_TAG_MESSAGE_VIEW_CONTAINER) Loading
legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListAppearance.kt +4 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ data class MessageListAppearance( val showContactPicture: Boolean, val showingThreadedList: Boolean, val backGroundAsReadIndicator: Boolean, val showAccountChip: Boolean, /** * Whether to show an account color indicator on the left side of the message item. */ val showAccountIndicator: Boolean, val density: UiDensity, )
legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt +2 −2 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ class MessageListFragment : maybeHideFloatingActionButton() } val isShowAccountChip: Boolean val isShowAccountIndicator: Boolean get() = isUnifiedFolders || !isSingleAccountMode override fun onAttach(context: Context) { Loading Loading @@ -785,7 +785,7 @@ class MessageListFragment : showingThreadedList = showingThreadedList, backGroundAsReadIndicator = generalSettingsManager .getConfig().display.visualSettings.isUseBackgroundAsUnreadIndicator, showAccountChip = isShowAccountChip, showAccountIndicator = isShowAccountIndicator, density = K9.messageListDensity, ) Loading
legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/item/MessageViewHolder.kt +5 −5 Original line number Diff line number Diff line Loading @@ -89,10 +89,10 @@ class MessageViewHolder( threadCount = displayThreadCount, ) if (appearance.showAccountChip) { val accountChipDrawable = chipView.drawable.mutate() DrawableCompat.setTint(accountChipDrawable, account.profile.color) chipView.setImageDrawable(accountChipDrawable) if (appearance.showAccountIndicator) { val accountIndicatorDrawable = chipView.drawable.mutate() DrawableCompat.setTint(accountIndicatorDrawable, account.profile.color) chipView.setImageDrawable(accountIndicatorDrawable) } if (appearance.stars) { Loading Loading @@ -315,7 +315,7 @@ class MessageViewHolder( holder.contactPictureView.isVisible = false } holder.chipView.isVisible = appearance.showAccountChip holder.chipView.isVisible = appearance.showAccountIndicator // 1 preview line is needed even if it is set to 0, because subject is part of the same text view holder.previewView.maxLines = max(appearance.previewLines, 1) Loading
legacy/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.kt +4 −4 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ class MessageTopView( private var isShowingProgress = false private var showPicturesButtonClicked = false private var showAccountChip = false private var showAccountIndicator = false private var messageCryptoPresenter: MessageCryptoPresenter? = null Loading @@ -83,8 +83,8 @@ class MessageTopView( hideHeaderView() } fun setShowAccountChip(showAccountChip: Boolean) { this.showAccountChip = showAccountChip fun setShowAccountIndicator(showAccountIndicator: Boolean) { this.showAccountIndicator = showAccountIndicator } private fun setShowPicturesButtonListener() { Loading Loading @@ -197,7 +197,7 @@ class MessageTopView( } fun setHeaders(message: Message?, account: LegacyAccountDto?, showStar: Boolean) { messageHeaderView.populate(message, account, showStar, showAccountChip) messageHeaderView.populate(message, account, showStar, showAccountIndicator) messageHeaderView.visibility = VISIBLE } Loading