ktlint: First line of body expression fits on same line as function signature

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2023-12-05 16:28:49 +01:00
parent 88970c59a5
commit f2da9b93de
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
3 changed files with 17 additions and 21 deletions

View File

@ -75,20 +75,19 @@ class PollCreateOptionViewHolder(
private fun getTextWatcher(
pollCreateOptionItem: PollCreateOptionItem,
itemsListener: PollCreateOptionsItemListener
) =
object : TextWatcher {
override fun afterTextChanged(s: Editable) {
// unused atm
}
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
// unused atm
}
override fun onTextChanged(option: CharSequence, start: Int, before: Int, count: Int) {
pollCreateOptionItem.pollOption = option.toString()
itemsListener.onOptionsItemTextChanged(pollCreateOptionItem)
}
) = object : TextWatcher {
override fun afterTextChanged(s: Editable) {
// unused atm
}
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
// unused atm
}
override fun onTextChanged(option: CharSequence, start: Int, before: Int, count: Int) {
pollCreateOptionItem.pollOption = option.toString()
itemsListener.onOptionsItemTextChanged(pollCreateOptionItem)
}
}
}

View File

@ -93,8 +93,7 @@ class FileAttachmentPreviewFragment(
filenames: String,
filesToUpload: MutableList<String>,
functionToCall: (files: MutableList<String>, caption: String) -> Unit
) =
FileAttachmentPreviewFragment(filenames, filesToUpload, functionToCall)
) = FileAttachmentPreviewFragment(filenames, filesToUpload, functionToCall)
val TAG: String = FilterConversationFragment::class.java.simpleName
}
}

View File

@ -55,11 +55,9 @@ class SSLSocketFactoryCompat(
}
}
override fun getDefaultCipherSuites(): Array<String>? =
cipherSuites ?: delegate.defaultCipherSuites
override fun getDefaultCipherSuites(): Array<String>? = cipherSuites ?: delegate.defaultCipherSuites
override fun getSupportedCipherSuites(): Array<String>? =
cipherSuites ?: delegate.supportedCipherSuites
override fun getSupportedCipherSuites(): Array<String>? = cipherSuites ?: delegate.supportedCipherSuites
override fun createSocket(s: Socket, host: String, port: Int, autoClose: Boolean): Socket {
val ssl = delegate.createSocket(s, host, port, autoClose)