Skip to content

Commit 4aade5d

Browse files
Fix ktlint violations
1 parent 719a835 commit 4aade5d

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

composeApp/src/commonMain/kotlin/com/developersbreach/kotlindictionarymultiplatform/ui/screens/detail/DetailScreenComponents.kt

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ fun SyntaxSection(
6767
syntax.notes?.let {
6868
Spacer(Modifier.height(4.dp))
6969
Text(
70-
text = stringResource(Res.string.notes_with_value, it),
70+
text = stringResource(
71+
Res.string.notes_with_value,
72+
it,
73+
),
7174
style = MaterialTheme.typography.bodyMedium,
7275
)
7376
}
@@ -79,18 +82,29 @@ fun SectionBlock(
7982
section: Section,
8083
) {
8184
section.heading?.let {
82-
Text(it, style = MaterialTheme.typography.headlineLarge, color = MaterialTheme.colorScheme.onPrimary)
85+
Text(
86+
text = it,
87+
style = MaterialTheme.typography.headlineLarge,
88+
color = MaterialTheme.colorScheme.onPrimary,
89+
)
8390
Spacer(Modifier.height(4.dp))
8491
}
8592

8693
section.content?.let {
87-
Text(it, style = MaterialTheme.typography.bodyMedium)
94+
Text(
95+
text = it,
96+
style = MaterialTheme.typography.bodyMedium,
97+
)
8898
Spacer(Modifier.height(8.dp))
8999
}
90100

91101
section.codeExamples.forEach { example ->
92102
example.description?.let {
93-
Text(it, fontWeight = FontWeight.Bold, style = MaterialTheme.typography.bodyMedium)
103+
Text(
104+
text = it,
105+
fontWeight = FontWeight.Bold,
106+
style = MaterialTheme.typography.bodyMedium,
107+
)
94108
}
95109
Spacer(Modifier.height(16.dp))
96110
CodeExampleBox(code = example.code)
@@ -110,7 +124,10 @@ fun PitfallsSection(
110124
Spacer(Modifier.height(4.dp))
111125
pitfalls.forEach {
112126
Text(
113-
text = stringResource(Res.string.bullet_item, it),
127+
text = stringResource(
128+
Res.string.bullet_item,
129+
it,
130+
),
114131
style = MaterialTheme.typography.bodyMedium,
115132
)
116133
}
@@ -129,7 +146,10 @@ fun RelatedTopicsSection(
129146
Spacer(Modifier.height(4.dp))
130147
relatedTopics.forEach {
131148
Text(
132-
text = stringResource(Res.string.bullet_item, it),
149+
text = stringResource(
150+
Res.string.bullet_item,
151+
it,
152+
),
133153
style = MaterialTheme.typography.bodyMedium,
134154
)
135155
}

composeApp/src/commonMain/kotlin/com/developersbreach/kotlindictionarymultiplatform/ui/screens/detail/DetailScreenUI.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ private fun DetailContent(
6767
items = detailUiState.tocEntries,
6868
) {
6969
TableOfContents(
70-
item = stringResource(it.titleRes, *it.formatArgs.toTypedArray()),
70+
item = stringResource(
71+
resource = it.titleRes,
72+
formatArgs = it.formatArgs.toTypedArray(),
73+
),
7174
onClick = {
7275
coroutineScope.launch {
7376
listState.animateScrollToItem(it.destinationIndex)

composeApp/src/commonMain/kotlin/com/developersbreach/kotlindictionarymultiplatform/ui/screens/detail/DetailTopAppBar.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ fun DetailTopBar(
3333
},
3434
navigationIcon = {
3535
IconButton(onClick = navigateUp) {
36-
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(Res.string.back))
36+
Icon(
37+
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
38+
contentDescription = stringResource(Res.string.back),
39+
)
3740
}
3841
},
3942
colors = TopAppBarDefaults.topAppBarColors(

0 commit comments

Comments
 (0)