mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
fix detekt warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
74bf9f2e91
commit
cd50115e06
@ -1091,14 +1091,14 @@ class ChatActivity :
|
|||||||
binding.outOfOfficeContainer.findViewById<View>(
|
binding.outOfOfficeContainer.findViewById<View>(
|
||||||
R.id.verticalLine
|
R.id.verticalLine
|
||||||
).setBackgroundColor(backgroundColor)
|
).setBackgroundColor(backgroundColor)
|
||||||
val setAlpha = ColorUtils.setAlphaComponent(backgroundColor, (0.3f * 255).toInt())
|
val setAlpha = ColorUtils.setAlphaComponent(backgroundColor, OUT_OF_OFFICE_ALPHA)
|
||||||
binding.outOfOfficeContainer.setCardBackgroundColor(setAlpha)
|
binding.outOfOfficeContainer.setCardBackgroundColor(setAlpha)
|
||||||
|
|
||||||
val startDateTimestamp: Long = uiState.userAbsence.startDate.toLong()
|
val startDateTimestamp: Long = uiState.userAbsence.startDate.toLong()
|
||||||
val endDateTimestamp: Long = uiState.userAbsence.endDate.toLong()
|
val endDateTimestamp: Long = uiState.userAbsence.endDate.toLong()
|
||||||
|
|
||||||
val startDate = Date(startDateTimestamp * 1000)
|
val startDate = Date(startDateTimestamp * ONE_SECOND_IN_MILLIS)
|
||||||
val endDate = Date(endDateTimestamp * 1000)
|
val endDate = Date(endDateTimestamp * ONE_SECOND_IN_MILLIS)
|
||||||
|
|
||||||
if (dateUtils.isSameDate(startDate, endDate)) {
|
if (dateUtils.isSameDate(startDate, endDate)) {
|
||||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceShortMessage).text =
|
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceShortMessage).text =
|
||||||
@ -4005,5 +4005,6 @@ class ChatActivity :
|
|||||||
private const val ACTOR_TYPE = "users"
|
private const val ACTOR_TYPE = "users"
|
||||||
const val CONVERSATION_INTERNAL_ID = "CONVERSATION_INTERNAL_ID"
|
const val CONVERSATION_INTERNAL_ID = "CONVERSATION_INTERNAL_ID"
|
||||||
const val NO_OFFLINE_MESSAGES_FOUND = "NO_OFFLINE_MESSAGES_FOUND"
|
const val NO_OFFLINE_MESSAGES_FOUND = "NO_OFFLINE_MESSAGES_FOUND"
|
||||||
|
const val OUT_OF_OFFICE_ALPHA = 76
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user