fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.4.15 (#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>
This commit is contained in:
parent
2944879d1b
commit
98d9abecd9
10 changed files with 19 additions and 6 deletions
|
|
@ -48,7 +48,7 @@ allprojects {
|
||||||
config.from(files("$rootDir/tools/detekt/detekt.yml"))
|
config.from(files("$rootDir/tools/detekt/detekt.yml"))
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
detektPlugins("io.nlopez.compose.rules:detekt:0.4.12")
|
detektPlugins("io.nlopez.compose.rules:detekt:0.4.15")
|
||||||
}
|
}
|
||||||
|
|
||||||
// KtLint
|
// KtLint
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ import kotlinx.collections.immutable.persistentListOf
|
||||||
@Composable
|
@Composable
|
||||||
fun WelcomeView(
|
fun WelcomeView(
|
||||||
applicationName: String,
|
applicationName: String,
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
onContinueClick: () -> Unit,
|
onContinueClick: () -> Unit,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
BackHandler(onBack = onContinueClick)
|
BackHandler(onBack = onContinueClick)
|
||||||
OnBoardingPage(
|
OnBoardingPage(
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ internal fun StaticMapPlaceholder(
|
||||||
contentDescription: String?,
|
contentDescription: String?,
|
||||||
width: Dp,
|
width: Dp,
|
||||||
height: Dp,
|
height: Dp,
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
onLoadMapClick: () -> Unit,
|
onLoadMapClick: () -> Unit,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
@Composable
|
@Composable
|
||||||
fun AccountProviderView(
|
fun AccountProviderView(
|
||||||
item: AccountProvider,
|
item: AccountProvider,
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ import kotlin.math.roundToInt
|
||||||
@Composable
|
@Composable
|
||||||
internal fun ExpandableBottomSheetScaffold(
|
internal fun ExpandableBottomSheetScaffold(
|
||||||
content: @Composable (padding: PaddingValues) -> Unit,
|
content: @Composable (padding: PaddingValues) -> Unit,
|
||||||
|
// False positive, it's not being reused
|
||||||
|
@Suppress("ContentSlotReused")
|
||||||
sheetContent: @Composable (subcomposing: Boolean) -> Unit,
|
sheetContent: @Composable (subcomposing: Boolean) -> Unit,
|
||||||
sheetDragHandle: @Composable () -> Unit,
|
sheetDragHandle: @Composable () -> Unit,
|
||||||
sheetSwipeEnabled: Boolean,
|
sheetSwipeEnabled: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -319,8 +319,8 @@ private fun MessagesViewContent(
|
||||||
onJoinCallClick: () -> Unit,
|
onJoinCallClick: () -> Unit,
|
||||||
onViewAllPinnedMessagesClick: () -> Unit,
|
onViewAllPinnedMessagesClick: () -> Unit,
|
||||||
forceJumpToBottomVisibility: Boolean,
|
forceJumpToBottomVisibility: Boolean,
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
onSwipeToReply: (TimelineItem.Event) -> Unit,
|
onSwipeToReply: (TimelineItem.Event) -> Unit,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
|
|
|
||||||
|
|
@ -239,8 +239,8 @@ private fun PinnedMessagesListLoaded(
|
||||||
private fun TimelineItemEventContentViewWrapper(
|
private fun TimelineItemEventContentViewWrapper(
|
||||||
event: TimelineItem.Event,
|
event: TimelineItem.Event,
|
||||||
onLinkClick: (String) -> Unit,
|
onLinkClick: (String) -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
onContentLayoutChange: (ContentAvoidingLayoutData) -> Unit,
|
onContentLayoutChange: (ContentAvoidingLayoutData) -> Unit,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
if (event.content is TimelineItemPollContent) {
|
if (event.content is TimelineItemPollContent) {
|
||||||
PollTitleView(
|
PollTitleView(
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ import androidx.compose.foundation.layout.wrapContentHeight
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
|
import androidx.compose.runtime.movableContentOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
|
@ -455,6 +456,8 @@ private fun MessageEventBubbleContent(
|
||||||
canShrinkContent: Boolean = false,
|
canShrinkContent: Boolean = false,
|
||||||
content: @Composable (onContentLayoutChange: (ContentAvoidingLayoutData) -> Unit) -> Unit,
|
content: @Composable (onContentLayoutChange: (ContentAvoidingLayoutData) -> Unit) -> Unit,
|
||||||
) {
|
) {
|
||||||
|
@Suppress("NAME_SHADOWING")
|
||||||
|
val content = remember { movableContentOf(content) }
|
||||||
when (timestampPosition) {
|
when (timestampPosition) {
|
||||||
TimestampPosition.Overlay ->
|
TimestampPosition.Overlay ->
|
||||||
Box(modifier, contentAlignment = Alignment.Center) {
|
Box(modifier, contentAlignment = Alignment.Center) {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.movableContentOf
|
||||||
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
@ -39,6 +41,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
* @param footer optional footer.
|
* @param footer optional footer.
|
||||||
* @param content main content.
|
* @param content main content.
|
||||||
*/
|
*/
|
||||||
|
@Suppress("NAME_SHADOWING")
|
||||||
@Composable
|
@Composable
|
||||||
fun HeaderFooterPage(
|
fun HeaderFooterPage(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
|
@ -51,6 +54,10 @@ fun HeaderFooterPage(
|
||||||
footer: @Composable () -> Unit = {},
|
footer: @Composable () -> Unit = {},
|
||||||
content: @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(
|
Scaffold(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
topBar = topBar,
|
topBar = topBar,
|
||||||
|
|
|
||||||
|
|
@ -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.
|
* 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.
|
* - 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
|
@Composable
|
||||||
fun <T> AsyncActionView(
|
fun <T> AsyncActionView(
|
||||||
async: AsyncAction<T>,
|
async: AsyncAction<T>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue