Apply Kotlinter 4.0.0
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
[*.{kt,kts}]
|
[*.{kt,kts}]
|
||||||
ktlint_code_style = android
|
ktlint_code_style = android_studio
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'kotlin-android'
|
id 'kotlin-android'
|
||||||
id 'org.jmailen.kotlinter' version '3.15.0'
|
id 'org.jmailen.kotlinter' version '4.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|||||||
@@ -51,10 +51,7 @@ internal object NotificationSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private fun createGeneralChannels(
|
private fun createGeneralChannels(context: Context, notificationManager: NotificationManager) {
|
||||||
context: Context,
|
|
||||||
notificationManager: NotificationManager
|
|
||||||
) {
|
|
||||||
try {
|
try {
|
||||||
val messagesImportanceMin = NotificationChannel(
|
val messagesImportanceMin = NotificationChannel(
|
||||||
Channel.MESSAGES_IMPORTANCE_MIN,
|
Channel.MESSAGES_IMPORTANCE_MIN,
|
||||||
@@ -98,11 +95,7 @@ internal object NotificationSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
fun createChannelIfNonexistent(
|
fun createChannelIfNonexistent(context: Context, groupId: String, channelId: String) {
|
||||||
context: Context,
|
|
||||||
groupId: String,
|
|
||||||
channelId: String
|
|
||||||
) {
|
|
||||||
if (!doesNotificationChannelExist(context, channelId)) {
|
if (!doesNotificationChannelExist(context, channelId)) {
|
||||||
val notificationManager = (context as Service)
|
val notificationManager = (context as Service)
|
||||||
.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||||
|
|||||||
@@ -30,11 +30,7 @@ internal object ClientFactory {
|
|||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clientToken(
|
fun clientToken(baseUrl: String, sslSettings: SSLSettings, token: String?): ApiClient {
|
||||||
baseUrl: String,
|
|
||||||
sslSettings: SSLSettings,
|
|
||||||
token: String?
|
|
||||||
): ApiClient {
|
|
||||||
val client = defaultClient(
|
val client = defaultClient(
|
||||||
arrayOf("clientTokenHeader"),
|
arrayOf("clientTokenHeader"),
|
||||||
"$baseUrl/",
|
"$baseUrl/",
|
||||||
|
|||||||
@@ -18,11 +18,7 @@ internal object Extras {
|
|||||||
return "text/markdown" == display["contentType"]
|
return "text/markdown" == display["contentType"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T> getNestedValue(
|
fun <T> getNestedValue(clazz: Class<T>, extras: Map<String, Any>?, vararg keys: String): T? {
|
||||||
clazz: Class<T>,
|
|
||||||
extras: Map<String, Any>?,
|
|
||||||
vararg keys: String
|
|
||||||
): T? {
|
|
||||||
var value: Any? = extras
|
var value: Any? = extras
|
||||||
|
|
||||||
keys.forEach { key ->
|
keys.forEach { key ->
|
||||||
|
|||||||
Reference in New Issue
Block a user