mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 14:24:05 +01:00
improve detekt score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
b06927726c
commit
60b277637b
@ -142,7 +142,7 @@ class MagicIncomingTextMessageViewHolder(itemView: View, payload: Any) : Message
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
params.setMargins(0, 0, 10, 0)
|
||||
params.setMargins(0, 0, EMOJI_RIGHT_MARGIN, 0)
|
||||
reactionAmount.layoutParams = params
|
||||
|
||||
binding.reactionsEmojiWrapper.addView(reactionEmoji)
|
||||
@ -308,5 +308,6 @@ class MagicIncomingTextMessageViewHolder(itemView: View, payload: Any) : Message
|
||||
companion object {
|
||||
const val TEXT_SIZE_MULTIPLIER = 2.5
|
||||
const val MAX_EMOJIS_TO_DISPLAY = 4
|
||||
const val EMOJI_RIGHT_MARGIN: Int = 10
|
||||
}
|
||||
}
|
||||
|
@ -2432,7 +2432,6 @@ class ChatController(args: Bundle) :
|
||||
if (hasVisibleItems(message as ChatMessage)) {
|
||||
activity?.let {
|
||||
MessageActionsDialog(
|
||||
activity!!,
|
||||
this,
|
||||
message,
|
||||
conversationUser?.userId,
|
||||
|
@ -277,6 +277,7 @@ class WebViewLoginController(args: Bundle? = null) : NewBaseController(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("Detekt.TooGenericExceptionCaught")
|
||||
override fun onReceivedSslError(view: WebView, handler: SslErrorHandler, error: SslError) {
|
||||
try {
|
||||
val sslCertificate = error.certificate
|
||||
|
@ -34,13 +34,12 @@ import com.nextcloud.talk.models.json.chat.ChatMessage
|
||||
import com.nextcloud.talk.models.json.conversations.Conversation
|
||||
|
||||
class MessageActionsDialog(
|
||||
val activity: Activity,
|
||||
private val chatController: ChatController,
|
||||
private val message: ChatMessage,
|
||||
private val userId: String?,
|
||||
private val currentConversation: Conversation?,
|
||||
private val showMessageDeletionButton: Boolean
|
||||
) : BottomSheetDialog(activity) {
|
||||
) : BottomSheetDialog(chatController.activity!!) {
|
||||
|
||||
private lateinit var dialogMessageActionsBinding: DialogMessageActionsBinding
|
||||
|
||||
|
@ -19,5 +19,4 @@ class ShowReactionsDialog(
|
||||
setContentView(dialogMessageReactionsBinding.root)
|
||||
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user