Skip to content

Commit 6b8dba6

Browse files
Update dependency io.nlopez.compose.rules:detekt to v0.4.8 (#3254)
* Update dependency io.nlopez.compose.rules:detekt to v0.4.8 * Fix new lint issues --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <[email protected]>
1 parent d02e107 commit 6b8dba6

File tree

8 files changed

+15
-6
lines changed

8 files changed

+15
-6
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ allprojects {
6161
config.from(files("$rootDir/tools/detekt/detekt.yml"))
6262
}
6363
dependencies {
64-
detektPlugins("io.nlopez.compose.rules:detekt:0.4.5")
64+
detektPlugins("io.nlopez.compose.rules:detekt:0.4.8")
6565
}
6666

6767
// KtLint

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/ExpandableBottomSheetScaffold.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ import kotlin.math.roundToInt
5858
* @param modifier The modifier for the layout.
5959
* @param sheetContentKey The key for the sheet content. If the key changes, the sheet will be remeasured.
6060
*/
61-
@Suppress("ContentTrailingLambda")
61+
@Suppress(
62+
"ContentTrailingLambda",
63+
// False positive
64+
"MultipleEmitters",
65+
)
6266
@OptIn(ExperimentalMaterial3Api::class)
6367
@Composable
6468
internal fun ExpandableBottomSheetScaffold(

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ private fun SheetContent(
218218
}
219219
}
220220

221+
@Suppress("MultipleEmitters") // False positive
221222
@Composable
222223
private fun MessageSummary(event: TimelineItem.Event, modifier: Modifier = Modifier) {
223224
val content: @Composable () -> Unit

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ private fun MessageSenderInformation(
376376
}
377377
}
378378

379+
@Suppress("MultipleEmitters") // False positive
379380
@Composable
380381
private fun MessageEventBubbleContent(
381382
event: TimelineItem.Event,

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fun TimelineItemReactionsLayout(
110110
}
111111
val rows = rowsIn.toMutableList()
112112
val secondLastRow = rows[rows.size - 2].toMutableList()
113-
val expandButtonPlaceable = secondLastRow.removeLast()
113+
val expandButtonPlaceable = secondLastRow.removeAt(secondLastRow.lastIndex)
114114
lastRow.add(0, expandButtonPlaceable)
115115
rows[rows.size - 2] = secondLastRow
116116
rows[rows.size - 1] = lastRow

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/typing/TypingNotificationView.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
5353
import io.element.android.libraries.matrix.api.room.RoomMember
5454
import kotlinx.collections.immutable.ImmutableList
5555

56+
@Suppress("MultipleEmitters") // False positive
5657
@Composable
5758
fun TypingNotificationView(
5859
state: TypingNotificationState,

libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
6464
import kotlinx.collections.immutable.ImmutableList
6565
import kotlinx.collections.immutable.toPersistentList
6666

67+
@Suppress("MultipleEmitters") // False positive
6768
@OptIn(ExperimentalMaterial3Api::class)
6869
@Composable
6970
fun RoomSelectView(

libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsView.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package io.element.android.libraries.troubleshoot.impl
1818

19+
import androidx.compose.foundation.layout.ColumnScope
1920
import androidx.compose.foundation.layout.fillMaxWidth
2021
import androidx.compose.foundation.layout.size
2122
import androidx.compose.foundation.progressSemantics
@@ -68,7 +69,7 @@ fun TroubleshootNotificationsView(
6869
}
6970

7071
@Composable
71-
private fun TroubleshootTestView(
72+
private fun ColumnScope.TroubleshootTestView(
7273
testState: NotificationTroubleshootTestState,
7374
onQuickFixClick: () -> Unit,
7475
) {
@@ -127,7 +128,7 @@ private fun TroubleshootTestView(
127128
}
128129

129130
@Composable
130-
private fun TroubleshootNotificationsContent(state: TroubleshootNotificationsState) {
131+
private fun ColumnScope.TroubleshootNotificationsContent(state: TroubleshootNotificationsState) {
131132
when (state.testSuiteState.mainState) {
132133
AsyncAction.Loading,
133134
AsyncAction.Confirming,
@@ -197,7 +198,7 @@ private fun RunTestButton(state: TroubleshootNotificationsState) {
197198
}
198199

199200
@Composable
200-
private fun TestSuiteView(
201+
private fun ColumnScope.TestSuiteView(
201202
testSuiteState: TroubleshootTestSuiteState,
202203
onQuickFixClick: (Int) -> Unit,
203204
) {

0 commit comments

Comments
 (0)