Skip to content

Commit

Permalink
style(lint): replace magic number with constant
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <[email protected]>
  • Loading branch information
AndyScherzinger committed Jan 16, 2025
1 parent e4088d0 commit 9e3840c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ abstract class PreviewMessageViewHolder(itemView: View?, payload: Any?) :
messageText.text = ""
}
itemView.setTag(R.string.replyable_message_view_tag, message.replyable)
val paddingSide = DisplayUtils.convertDpToPixel(8.0f, context!!).toInt()
val paddingSide = DisplayUtils.convertDpToPixel(HORIZONTAL_REACTION_PADDING, context!!).toInt()
Reaction().showReactions(
message,
::clickOnReaction,
Expand Down Expand Up @@ -339,5 +339,6 @@ abstract class PreviewMessageViewHolder(itemView: View?, payload: Any?) :
const val ACTOR_ID_CHANGELOG = "changelog"
const val KEY_NAME = "name"
const val MIN_IMAGE_HEIGHT = 100F
const val HORIZONTAL_REACTION_PADDING = 8.0F
}
}
2 changes: 1 addition & 1 deletion detekt.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: GPL-3.0-or-later
build:
maxIssues: 82
maxIssues: 78
weights:
# complexity: 2
# LongParameterList: 1
Expand Down

0 comments on commit 9e3840c

Please sign in to comment.