Skip to content
Snippets Groups Projects
Commit c45d4d6d authored by Adrien Béraud's avatar Adrien Béraud
Browse files

conversation: check for null

Change-Id: I48c16aa1f18df99ee4d4fa967c35e9066678d47a
parent 1d363351
No related branches found
No related tags found
No related merge requests found
......@@ -651,9 +651,9 @@ class ConversationAdapter(
&& interaction.type == Interaction.InteractionType.TEXT
&& !interaction.isIncoming
) {
v.background.setTint(convColor)
v.background?.setTint(convColor)
} else {
v.background.setTintList(null)
v.background?.setTintList(null)
}
}
elevation = v.context.resources.getDimension(R.dimen.call_preview_elevation)
......@@ -777,7 +777,7 @@ class ConversationAdapter(
else -> viewHolder.mFileInfoLayout
} ?: return
if (type == MessageType.TransferType.AUDIO || type == MessageType.TransferType.FILE) {
longPressView.background.setTintList(null)
longPressView.background?.setTintList(null)
}
longPressView.setOnLongClickListener { v: View ->
if (type == MessageType.TransferType.AUDIO || type == MessageType.TransferType.FILE) {
......@@ -1057,7 +1057,7 @@ class ConversationAdapter(
val context = convViewHolder.itemView.context
if (!interaction.isSwarm) {
convViewHolder.mCallInfoLayout?.apply {
background.setTintList(null)
background?.setTintList(null)
setOnCreateContextMenuListener { menu: ContextMenu, v: View, menuInfo: ContextMenuInfo? ->
conversationFragment.onCreateContextMenu(menu, v, menuInfo)
val inflater = conversationFragment.requireActivity().menuInflater
......
......@@ -811,7 +811,7 @@ class ConversationFragment : BaseSupportFragment<ConversationPresenter, Conversa
updateListPadding()
currentBottomView?.isVisible = true
if (animation.isStarted) animation.cancel()
animation.setIntValues(binding.histList.paddingBottom, currentBottomView!!.height + marginPxTotal)
animation.setIntValues(binding.histList.paddingBottom, (currentBottomView?.height ?: 0) + marginPxTotal)
animation.start()
return true
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment