fix detekt warnings

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-12-20 14:47:37 +01:00
parent 74bf9f2e91
commit cd50115e06
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -1091,14 +1091,14 @@ class ChatActivity :
binding.outOfOfficeContainer.findViewById<View>(
R.id.verticalLine
).setBackgroundColor(backgroundColor)
val setAlpha = ColorUtils.setAlphaComponent(backgroundColor, (0.3f * 255).toInt())
val setAlpha = ColorUtils.setAlphaComponent(backgroundColor, OUT_OF_OFFICE_ALPHA)
binding.outOfOfficeContainer.setCardBackgroundColor(setAlpha)
val startDateTimestamp: Long = uiState.userAbsence.startDate.toLong()
val endDateTimestamp: Long = uiState.userAbsence.endDate.toLong()
val startDate = Date(startDateTimestamp * 1000)
val endDate = Date(endDateTimestamp * 1000)
val startDate = Date(startDateTimestamp * ONE_SECOND_IN_MILLIS)
val endDate = Date(endDateTimestamp * ONE_SECOND_IN_MILLIS)
if (dateUtils.isSameDate(startDate, endDate)) {
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceShortMessage).text =
@ -4005,5 +4005,6 @@ class ChatActivity :
private const val ACTOR_TYPE = "users"
const val CONVERSATION_INTERNAL_ID = "CONVERSATION_INTERNAL_ID"
const val NO_OFFLINE_MESSAGES_FOUND = "NO_OFFLINE_MESSAGES_FOUND"
const val OUT_OF_OFFICE_ALPHA = 76
}
}