Fixed ktlintCheck and Codacy Static Code Analysis Errors

Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in>
This commit is contained in:
Smarshal21 2023-12-16 20:47:21 +05:30
parent 561fd037c4
commit 09968e4d7c
5 changed files with 14 additions and 14 deletions

View file

@ -1447,15 +1447,15 @@ class ChatActivity :
val messageInput = binding.messageInputView.findViewById<ImageEmojiEditText>(R.id.messageInput)
messageInput.setOnFocusChangeListener { _, hasFocus ->
if (hasFocus) {
KeyboardToggle()
keyboardtoggle()
}
}
messageInput.setOnClickListener {
KeyboardToggle()
keyboardtoggle()
}
}
private fun KeyboardToggle() {
private fun keyboardtoggle() {
binding.messageInputView.findViewById<FrameLayout>(R.id.emoji_picker).visibility = View.GONE
isEmojiPickerVisible = false
}
@ -1471,7 +1471,7 @@ class ChatActivity :
binding.messageInputView.findViewById<EmojiPickerView>(R.id.emoji_picker).visibility = View.GONE
isEmojiPickerVisible = false
}
binding.messageInputView.findViewById<EmojiPickerView>(R.id.emoji_picker).setOnEmojiPickedListener() {
binding.messageInputView.findViewById<EmojiPickerView>(R.id.emoji_picker).setOnEmojiPickedListener {
binding.messageInputView.inputEditText.editableText?.append(it.emoji)
}
}

View file

@ -160,7 +160,7 @@ class CreateConversationDialogFragment : DialogFragment() {
imm.hideSoftInputFromWindow(binding.textEdit.windowToken, 0)
}
private fun KeyboardToggle() {
private fun keyboardtoggle() {
binding.emojiPicker.visibility = View.GONE
isEmojiPickerVisible = false
}
@ -174,7 +174,7 @@ class CreateConversationDialogFragment : DialogFragment() {
binding.emojiPicker.visibility = View.GONE
isEmojiPickerVisible = false
}
binding.emojiPicker.setOnEmojiPickedListener() {
binding.emojiPicker.setOnEmojiPickedListener {
binding.textEdit.editableText?.append(it.emoji)
}
}
@ -183,10 +183,10 @@ class CreateConversationDialogFragment : DialogFragment() {
binding.smileyButton.setOnClickListener { setupEmojiPopup() }
binding.textEdit.setOnFocusChangeListener { _, hasFocus ->
if (hasFocus) {
KeyboardToggle()
keyboardtoggle()
}
}
binding.textEdit.setOnClickListener { KeyboardToggle() }
binding.textEdit.setOnClickListener { keyboardtoggle() }
binding.textEdit.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
// unused atm

View file

@ -127,7 +127,7 @@ class RenameConversationDialogFragment : DialogFragment() {
imm.hideSoftInputFromWindow(binding.textEdit.windowToken, 0)
}
private fun KeyboardToggle() {
private fun keyboardtoggle() {
binding.emojiPicker.visibility = View.GONE
isEmojiPickerVisible = false
}
@ -141,7 +141,7 @@ class RenameConversationDialogFragment : DialogFragment() {
binding.emojiPicker.visibility = View.GONE
isEmojiPickerVisible = false
}
binding.emojiPicker.setOnEmojiPickedListener() {
binding.emojiPicker.setOnEmojiPickedListener {
binding.textEdit.editableText?.append(it.emoji)
}
}
@ -150,10 +150,10 @@ class RenameConversationDialogFragment : DialogFragment() {
binding.smileyButton.setOnClickListener { setupEmojiPopup() }
binding.textEdit.setOnFocusChangeListener { _, hasFocus ->
if (hasFocus) {
KeyboardToggle()
keyboardtoggle()
}
}
binding.textEdit.setOnClickListener { KeyboardToggle() }
binding.textEdit.setOnClickListener { keyboardtoggle() }
binding.textEdit.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
// unused atm

View file

@ -138,7 +138,7 @@ class MessageActionsDialog(
}
dialogMessageActionsBinding.emojiMore.setOnClickListener { toggleEmojiPopup() }
dialogMessageActionsBinding.emojiPicker.setOnEmojiPickedListener() {
dialogMessageActionsBinding.emojiPicker.setOnEmojiPickedListener {
clickOnEmoji(message, it.emoji)
}
}

View file

@ -189,7 +189,7 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
binding.clearStatus.setOnClickListener { clearStatus() }
binding.setStatus.setOnClickListener { setStatusMessage() }
binding.emojiPicker.setOnEmojiPickedListener() {
binding.emojiPicker.setOnEmojiPickedListener {
binding.emoji.text = (it.emoji)
binding.emojiPicker.visibility = GONE
isEmojiPickerVisible = false