Make function somewhat more concise.
This commit is contained in:
parent
4beee75b32
commit
d2d4614601
1 changed files with 4 additions and 8 deletions
|
@ -82,14 +82,10 @@ class MessageListAdapter internal constructor(
|
|||
listItemListener.onToggleMessageSelection(messageListItem)
|
||||
}
|
||||
|
||||
private fun recipientSigil(toMe: Boolean, ccMe: Boolean): String {
|
||||
return if (toMe) {
|
||||
res.getString(R.string.messagelist_sent_to_me_sigil)
|
||||
} else if (ccMe) {
|
||||
res.getString(R.string.messagelist_sent_cc_me_sigil)
|
||||
} else {
|
||||
""
|
||||
}
|
||||
private fun recipientSigil(toMe: Boolean, ccMe: Boolean) = when {
|
||||
toMe -> res.getString(R.string.messagelist_sent_to_me_sigil)
|
||||
ccMe -> res.getString(R.string.messagelist_sent_cc_me_sigil)
|
||||
else -> ""
|
||||
}
|
||||
|
||||
override fun hasStableIds(): Boolean = true
|
||||
|
|
Loading…
Reference in a new issue