diff --git a/.editorconfig b/.editorconfig index 1b8d08e..3f25798 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,2 +1,2 @@ [*.{kt,kts}] -ktlint_code_style = android \ No newline at end of file +ktlint_code_style = android_studio \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 8f21185..bbc090d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 { diff --git a/app/src/main/kotlin/com/github/gotify/NotificationSupport.kt b/app/src/main/kotlin/com/github/gotify/NotificationSupport.kt index c9f5800..77cc0b1 100644 --- a/app/src/main/kotlin/com/github/gotify/NotificationSupport.kt +++ b/app/src/main/kotlin/com/github/gotify/NotificationSupport.kt @@ -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 diff --git a/app/src/main/kotlin/com/github/gotify/api/ClientFactory.kt b/app/src/main/kotlin/com/github/gotify/api/ClientFactory.kt index 7a837d2..1edf4e0 100644 --- a/app/src/main/kotlin/com/github/gotify/api/ClientFactory.kt +++ b/app/src/main/kotlin/com/github/gotify/api/ClientFactory.kt @@ -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/", diff --git a/app/src/main/kotlin/com/github/gotify/messages/Extras.kt b/app/src/main/kotlin/com/github/gotify/messages/Extras.kt index 39a01d9..68086fc 100644 --- a/app/src/main/kotlin/com/github/gotify/messages/Extras.kt +++ b/app/src/main/kotlin/com/github/gotify/messages/Extras.kt @@ -18,11 +18,7 @@ internal object Extras { return "text/markdown" == display["contentType"] } - fun getNestedValue( - clazz: Class, - extras: Map?, - vararg keys: String - ): T? { + fun getNestedValue(clazz: Class, extras: Map?, vararg keys: String): T? { var value: Any? = extras keys.forEach { key ->