Skip to content

Commit

Permalink
fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.4.15 (
Browse files Browse the repository at this point in the history
#3595)

* Update dependency io.nlopez.compose.rules:detekt to v0.4.15

* Fix new detekt issues

* Fix KtLint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
  • Loading branch information
renovate[bot] and jmartinesp authored Oct 4, 2024
1 parent 2944879 commit 98d9abe
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ allprojects {
config.from(files("$rootDir/tools/detekt/detekt.yml"))
}
dependencies {
detektPlugins("io.nlopez.compose.rules:detekt:0.4.12")
detektPlugins("io.nlopez.compose.rules:detekt:0.4.15")
}

// KtLint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import kotlinx.collections.immutable.persistentListOf
@Composable
fun WelcomeView(
applicationName: String,
modifier: Modifier = Modifier,
onContinueClick: () -> Unit,
modifier: Modifier = Modifier,
) {
BackHandler(onBack = onContinueClick)
OnBoardingPage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ internal fun StaticMapPlaceholder(
contentDescription: String?,
width: Dp,
height: Dp,
modifier: Modifier = Modifier,
onLoadMapClick: () -> Unit,
modifier: Modifier = Modifier,
) {
Box(
contentAlignment = Alignment.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import io.element.android.libraries.designsystem.theme.components.Text
@Composable
fun AccountProviderView(
item: AccountProvider,
modifier: Modifier = Modifier,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
Column(
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import kotlin.math.roundToInt
@Composable
internal fun ExpandableBottomSheetScaffold(
content: @Composable (padding: PaddingValues) -> Unit,
// False positive, it's not being reused
@Suppress("ContentSlotReused")
sheetContent: @Composable (subcomposing: Boolean) -> Unit,
sheetDragHandle: @Composable () -> Unit,
sheetSwipeEnabled: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ private fun MessagesViewContent(
onJoinCallClick: () -> Unit,
onViewAllPinnedMessagesClick: () -> Unit,
forceJumpToBottomVisibility: Boolean,
modifier: Modifier = Modifier,
onSwipeToReply: (TimelineItem.Event) -> Unit,
modifier: Modifier = Modifier,
) {
Box(
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ private fun PinnedMessagesListLoaded(
private fun TimelineItemEventContentViewWrapper(
event: TimelineItem.Event,
onLinkClick: (String) -> Unit,
modifier: Modifier = Modifier,
onContentLayoutChange: (ContentAvoidingLayoutData) -> Unit,
modifier: Modifier = Modifier,
) {
if (event.content is TimelineItemPollContent) {
PollTitleView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.movableContentOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -455,6 +456,8 @@ private fun MessageEventBubbleContent(
canShrinkContent: Boolean = false,
content: @Composable (onContentLayoutChange: (ContentAvoidingLayoutData) -> Unit) -> Unit,
) {
@Suppress("NAME_SHADOWING")
val content = remember { movableContentOf(content) }
when (timestampPosition) {
TimestampPosition.Overlay ->
Box(modifier, contentAlignment = Alignment.Center) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.movableContentOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
Expand All @@ -39,6 +41,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
* @param footer optional footer.
* @param content main content.
*/
@Suppress("NAME_SHADOWING")
@Composable
fun HeaderFooterPage(
modifier: Modifier = Modifier,
Expand All @@ -51,6 +54,10 @@ fun HeaderFooterPage(
footer: @Composable () -> Unit = {},
content: @Composable () -> Unit = {},
) {
val topBar = remember { movableContentOf(topBar) }
val header = remember { movableContentOf(header) }
val footer = remember { movableContentOf(footer) }
val content = remember { movableContentOf(content) }
Scaffold(
modifier = modifier,
topBar = topBar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight
* closed, [onErrorDismiss] will be invoked. If [onRetry] is not null, a retry button will be displayed.
* - When loading, display a loading dialog using [progressDialog]. Pass empty lambda to disable.
*/
@Suppress("ContentSlotReused") // False positive, the lambdas don't add composable views
@Composable
fun <T> AsyncActionView(
async: AsyncAction<T>,
Expand Down

0 comments on commit 98d9abe

Please sign in to comment.