Skip to content

Commit c601d9c

Browse files
Fix Lint issue
1 parent 970ec03 commit c601d9c

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ buildscript {
1818

1919
plugins {
2020
id "org.sonarqube" version "3.5.0.2730"
21+
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
2122
}
2223

2324
sonarqube {
@@ -28,7 +29,7 @@ sonarqube {
2829
}
2930
}
3031

31-
apply plugin: 'org.jlleitschuh.gradle.ktlint'
32+
3233
apply plugin: "kotlin-android"
3334
apply plugin: 'com.mparticle.kit'
3435

src/main/kotlin/com/mparticle/kits/RoktKit.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ class RoktKit :
6363

6464
private var deferredAttributes: CompletableDeferred<Map<String, String>>? = null
6565

66-
public override fun onKitCreate(
67-
settings: Map<String, String>,
68-
ctx: Context
69-
): List<ReportingMessage> {
66+
public override fun onKitCreate(settings: Map<String, String>, ctx: Context): List<ReportingMessage> {
7067
register(this)
7168
applicationContext = ctx.applicationContext
7269
val roktTagId = settings[ROKT_ACCOUNT_ID]
@@ -206,13 +203,13 @@ class RoktKit :
206203
// Pass placeholders and fontTypefaces only if they are not empty or null
207204
placeholders.takeIf { it?.isNotEmpty() == true },
208205
fontTypefaces.takeIf { it?.isNotEmpty() == true },
209-
roktConfig
206+
roktConfig,
210207
)
211208
}
212209

213210
private fun prepareFinalAttributes(
214211
filterUser: FilteredMParticleUser?,
215-
attributes: Map<String, String>?
212+
attributes: Map<String, String>?,
216213
): Map<String, String> {
217214
val finalAttributes = mutableMapOf<String, String>()
218215
filterUser?.userAttributes?.let { userAttrs ->
@@ -301,7 +298,7 @@ class RoktKit :
301298
suspend fun runComposableWithCallback(
302299
attributes: Map<String, String>,
303300
mpRoktEventCallback: MpRoktEventCallback?,
304-
onResult: (Map<String, String>, RoktCallback) -> Unit
301+
onResult: (Map<String, String>, RoktCallback) -> Unit,
305302
) {
306303
val instance = MParticle.getInstance()
307304
deferredAttributes = CompletableDeferred()

src/main/kotlin/com/mparticle/kits/RoktLayout.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.mparticle.MpRoktEventCallback
99
import com.rokt.roktsdk.Rokt
1010

1111
@Composable
12+
@Suppress("FunctionName")
1213
fun RoktLayout(
1314
sdkTriggered: Boolean,
1415
viewName: String,
@@ -31,7 +32,8 @@ fun RoktLayout(
3132
onLoad = { resultMap.callback.onLoad() },
3233
onShouldShowLoadingIndicator = { resultMap.callback.onShouldShowLoadingIndicator() },
3334
onShouldHideLoadingIndicator = { resultMap.callback.onShouldHideLoadingIndicator() },
34-
onUnload = { reason -> resultMap.callback.onUnload(reason) })
35+
onUnload = { reason -> resultMap.callback.onUnload(reason) },
36+
)
3537
}
3638
}
3739

0 commit comments

Comments
 (0)