show replacement only if the user set a replacement

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-12-05 08:49:33 +01:00
parent 083f0de063
commit c9d5bc68a2
No known key found for this signature in database
GPG Key ID: F7AA2A8B65B50220

View File

@ -1084,11 +1084,14 @@ class ChatActivity :
context.resources.getString(R.string.user_absence),
uiState.userAbsence.userId
)
if(uiState.userAbsence.replacementUserDisplayName != null){
binding.outOfOfficeContainer.findViewById<TextView>(R.id.absenceReplacement).text = String.format(
context.resources.getString(R.string.user_absence_replacement),
uiState.userAbsence.replacementUserDisplayName
)
}else{
binding.outOfOfficeContainer.findViewById<TextView>(R.id.absenceReplacement).visibility = View.GONE
}
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceLongMessage).text = uiState.userAbsence.message
}
}