Fixed ktlintCheck

Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in>
This commit is contained in:
Smarshal21 2023-11-14 14:33:28 +05:30
parent c173c70bd7
commit ac030a22a8
4 changed files with 15 additions and 10 deletions

View File

@ -1428,7 +1428,6 @@ class ChatActivity :
val smileyButton = binding.messageInputView.findViewById<ImageButton>(R.id.smileyButton) val smileyButton = binding.messageInputView.findViewById<ImageButton>(R.id.smileyButton)
smileyButton?.setOnClickListener { smileyButton?.setOnClickListener {
if (!isEmojiPickerVisible) { if (!isEmojiPickerVisible) {
binding.messageInputView.findViewById<FrameLayout>(R.id.emoji_picker).visibility = View.VISIBLE binding.messageInputView.findViewById<FrameLayout>(R.id.emoji_picker).visibility = View.VISIBLE
isEmojiPickerVisible = true isEmojiPickerVisible = true

View File

@ -271,7 +271,8 @@ class CreateConversationDialogFragment : DialogFragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
dialog?.window?.setLayout( dialog?.window?.setLayout(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
) )
} }

View File

@ -61,8 +61,6 @@ class RenameConversationDialogFragment : DialogFragment() {
private lateinit var binding: DialogRenameConversationBinding private lateinit var binding: DialogRenameConversationBinding
private lateinit var viewModel: RenameConversationViewModel private lateinit var viewModel: RenameConversationViewModel
private var isEmojiPickerVisible = false private var isEmojiPickerVisible = false
private var roomToken = "" private var roomToken = ""
private var initialName = "" private var initialName = ""
@ -98,10 +96,8 @@ class RenameConversationDialogFragment : DialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
setupListeners() setupListeners()
setupStateObserver() setupStateObserver()
} }
override fun onStart() { override fun onStart() {
@ -200,12 +196,15 @@ class RenameConversationDialogFragment : DialogFragment() {
Log.e(TAG, "Failed to rename conversation") Log.e(TAG, "Failed to rename conversation")
Snackbar.make(binding.root, R.string.nc_common_error_sorry, Snackbar.LENGTH_LONG).show() Snackbar.make(binding.root, R.string.nc_common_error_sorry, Snackbar.LENGTH_LONG).show()
} }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
dialog?.window?.setLayout( dialog?.window?.setLayout(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
) )
} }
/** /**
* Fragment creator * Fragment creator
*/ */

View File

@ -137,7 +137,8 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
override fun onNext(responseBody: ResponseBody) { override fun onNext(responseBody: ResponseBody) {
val predefinedStatusOverall: PredefinedStatusOverall = LoganSquare.parse( val predefinedStatusOverall: PredefinedStatusOverall = LoganSquare.parse(
responseBody.string(), PredefinedStatusOverall::class.java responseBody.string(),
PredefinedStatusOverall::class.java
) )
predefinedStatusOverall.ocs?.data?.let { it1 -> predefinedStatusesList.addAll(it1) } predefinedStatusOverall.ocs?.data?.let { it1 -> predefinedStatusesList.addAll(it1) }
@ -461,7 +462,11 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
selectedPredefinedStatus!!.icon != binding.emoji.text.toString() selectedPredefinedStatus!!.icon != binding.emoji.text.toString()
) { ) {
ncApi.setCustomStatusMessage( ncApi.setCustomStatusMessage(
credentials, ApiUtils.getUrlForSetCustomStatus(currentUser?.baseUrl), statusIcon, inputText, clearAt credentials,
ApiUtils.getUrlForSetCustomStatus(currentUser?.baseUrl),
statusIcon,
inputText,
clearAt
).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) ).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<GenericOverall> { ?.subscribe(object : Observer<GenericOverall> {
@ -553,7 +558,8 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
dialog?.window?.setLayout( dialog?.window?.setLayout(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
) )
} }