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( private fun getTextWatcher(
pollCreateOptionItem: PollCreateOptionItem, pollCreateOptionItem: PollCreateOptionItem,
itemsListener: PollCreateOptionsItemListener itemsListener: PollCreateOptionsItemListener
) = ) = object : TextWatcher {
object : TextWatcher { override fun afterTextChanged(s: Editable) {
override fun afterTextChanged(s: Editable) { // unused atm
// 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)
}
} }
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, filenames: String,
filesToUpload: MutableList<String>, filesToUpload: MutableList<String>,
functionToCall: (files: MutableList<String>, caption: String) -> Unit functionToCall: (files: MutableList<String>, caption: String) -> Unit
) = ) = FileAttachmentPreviewFragment(filenames, filesToUpload, functionToCall)
FileAttachmentPreviewFragment(filenames, filesToUpload, functionToCall)
val TAG: String = FilterConversationFragment::class.java.simpleName val TAG: String = FilterConversationFragment::class.java.simpleName
} }
} }

View File

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