mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 05:03:04 +00:00
Replace any magic numbers detekt-ed
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
f7e5881d87
commit
c6e082c6b1
@ -258,7 +258,7 @@ class CallNotificationActivity : CallBaseActivity() {
|
|||||||
notificationHandler.post(object : Runnable {
|
notificationHandler.post(object : Runnable {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (NotificationUtils.isNotificationVisible(context, notificationTimestamp!!.toInt())) {
|
if (NotificationUtils.isNotificationVisible(context, notificationTimestamp!!.toInt())) {
|
||||||
notificationHandler.postDelayed(this, 1000)
|
notificationHandler.postDelayed(this, ONE_SECOND)
|
||||||
} else {
|
} else {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
@ -320,5 +320,6 @@ class CallNotificationActivity : CallBaseActivity() {
|
|||||||
companion object {
|
companion object {
|
||||||
const val TAG = "CallNotificationActivity"
|
const val TAG = "CallNotificationActivity"
|
||||||
const val GET_ROOM_RETRY_COUNT: Long = 3
|
const val GET_ROOM_RETRY_COUNT: Long = 3
|
||||||
|
const val ONE_SECOND: Long = 1000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ class ReactionAnimator(
|
|||||||
|
|
||||||
val emojiView = EmojiTextView(context)
|
val emojiView = EmojiTextView(context)
|
||||||
emojiView.text = callReaction.emoji
|
emojiView.text = callReaction.emoji
|
||||||
emojiView.textSize = 20f
|
emojiView.textSize = TEXT_SIZE
|
||||||
|
|
||||||
val nameView = getNameView(callReaction)
|
val nameView = getNameView(callReaction)
|
||||||
reactionWrapper.addView(emojiView)
|
reactionWrapper.addView(emojiView)
|
||||||
@ -141,7 +141,7 @@ class ReactionAnimator(
|
|||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
)
|
)
|
||||||
|
|
||||||
nameViewParams.setMargins(20, 0, 20, 5)
|
nameViewParams.setMargins(HORIZONTAL_MARGIN, 0, HORIZONTAL_MARGIN, BOTTOM_MARGIN)
|
||||||
nameView.layoutParams = nameViewParams
|
nameView.layoutParams = nameViewParams
|
||||||
|
|
||||||
nameView.text = " " + callReaction.userName + " "
|
nameView.text = " " + callReaction.userName + " "
|
||||||
@ -176,6 +176,10 @@ class ReactionAnimator(
|
|||||||
|
|
||||||
private const val ZERO_ALPHA = 0f
|
private const val ZERO_ALPHA = 0f
|
||||||
private const val ALPHA_PROPERTY = "alpha"
|
private const val ALPHA_PROPERTY = "alpha"
|
||||||
|
|
||||||
|
private const val TEXT_SIZE = 20f
|
||||||
|
private const val HORIZONTAL_MARGIN: Int = 20
|
||||||
|
private const val BOTTOM_MARGIN: Int = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data class CallReaction(
|
data class CallReaction(
|
||||||
|
@ -118,7 +118,7 @@ class MoreCallActionsDialog(private val callActivity: CallActivity) : BottomShee
|
|||||||
availableReactions.forEach {
|
availableReactions.forEach {
|
||||||
val emojiView = EmojiTextView(context)
|
val emojiView = EmojiTextView(context)
|
||||||
emojiView.text = it.toString()
|
emojiView.text = it.toString()
|
||||||
emojiView.textSize = 20f
|
emojiView.textSize = TEXT_SIZE
|
||||||
emojiView.layoutParams = param
|
emojiView.layoutParams = param
|
||||||
|
|
||||||
emojiView.setOnClickListener { view ->
|
emojiView.setOnClickListener { view ->
|
||||||
@ -198,5 +198,6 @@ class MoreCallActionsDialog(private val callActivity: CallActivity) : BottomShee
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "MoreCallActionsDialog"
|
private const val TAG = "MoreCallActionsDialog"
|
||||||
|
private const val TEXT_SIZE = 20f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user