Apply Kotlinter 4.0.0

This commit is contained in:
Niko Diamadis
2023-11-11 23:49:05 +01:00
parent 203b3a76d5
commit 537c34cc87
5 changed files with 6 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jmailen.kotlinter' version '3.15.0'
id 'org.jmailen.kotlinter' version '4.0.0'
}
android {

View File

@@ -51,10 +51,7 @@ internal object NotificationSupport {
}
@RequiresApi(Build.VERSION_CODES.O)
private fun createGeneralChannels(
context: Context,
notificationManager: NotificationManager
) {
private fun createGeneralChannels(context: Context, notificationManager: NotificationManager) {
try {
val messagesImportanceMin = NotificationChannel(
Channel.MESSAGES_IMPORTANCE_MIN,
@@ -98,11 +95,7 @@ internal object NotificationSupport {
}
@RequiresApi(api = Build.VERSION_CODES.O)
fun createChannelIfNonexistent(
context: Context,
groupId: String,
channelId: String
) {
fun createChannelIfNonexistent(context: Context, groupId: String, channelId: String) {
if (!doesNotificationChannelExist(context, channelId)) {
val notificationManager = (context as Service)
.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

View File

@@ -30,11 +30,7 @@ internal object ClientFactory {
return client
}
fun clientToken(
baseUrl: String,
sslSettings: SSLSettings,
token: String?
): ApiClient {
fun clientToken(baseUrl: String, sslSettings: SSLSettings, token: String?): ApiClient {
val client = defaultClient(
arrayOf("clientTokenHeader"),
"$baseUrl/",

View File

@@ -18,11 +18,7 @@ internal object Extras {
return "text/markdown" == display["contentType"]
}
fun <T> getNestedValue(
clazz: Class<T>,
extras: Map<String, Any>?,
vararg keys: String
): T? {
fun <T> getNestedValue(clazz: Class<T>, extras: Map<String, Any>?, vararg keys: String): T? {
var value: Any? = extras
keys.forEach { key ->