Merge pull request #1001 from vector-im/renovate/io.nlopez.compose.rules-detekt-0.x
Update dependency io.nlopez.compose.rules:detekt to v0.2.1
This commit is contained in:
@@ -61,7 +61,7 @@ allprojects {
|
||||
config.from(files("$rootDir/tools/detekt/detekt.yml"))
|
||||
}
|
||||
dependencies {
|
||||
detektPlugins("io.nlopez.compose.rules:detekt:0.1.12")
|
||||
detektPlugins("io.nlopez.compose.rules:detekt:0.2.1")
|
||||
}
|
||||
|
||||
// KtLint
|
||||
|
||||
@@ -111,7 +111,8 @@ fun StaticMapView(
|
||||
StaticMapPlaceholder(
|
||||
showProgress = painter.state is AsyncImagePainter.State.Loading,
|
||||
contentDescription = contentDescription,
|
||||
modifier = Modifier.size(width = maxWidth, height = maxHeight),
|
||||
width = maxWidth,
|
||||
height = maxHeight,
|
||||
onLoadMapClick = { retryHash++ }
|
||||
)
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.features.location.api.R
|
||||
import io.element.android.libraries.designsystem.preview.DayNightPreviews
|
||||
@@ -44,34 +45,34 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
||||
internal fun StaticMapPlaceholder(
|
||||
showProgress: Boolean,
|
||||
contentDescription: String?,
|
||||
width: Dp,
|
||||
height: Dp,
|
||||
modifier: Modifier = Modifier,
|
||||
onLoadMapClick: () -> Unit,
|
||||
) {
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = modifier
|
||||
.size(width = width, height = height)
|
||||
.then(if (showProgress) Modifier else Modifier.clickable(onClick = onLoadMapClick))
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.blurred_map),
|
||||
contentDescription = contentDescription,
|
||||
modifier = modifier,
|
||||
contentScale = ContentScale.FillBounds,
|
||||
modifier = Modifier.size(width = width, height = height)
|
||||
)
|
||||
if (showProgress) {
|
||||
CircularProgressIndicator()
|
||||
} else {
|
||||
Box(
|
||||
modifier = modifier.clickable(onClick = onLoadMapClick),
|
||||
contentAlignment = Alignment.Center,
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Refresh,
|
||||
contentDescription = null
|
||||
)
|
||||
Text(text = stringResource(id = CommonStrings.action_static_map_load))
|
||||
}
|
||||
Icon(
|
||||
imageVector = Icons.Default.Refresh,
|
||||
contentDescription = null
|
||||
)
|
||||
Text(text = stringResource(id = CommonStrings.action_static_map_load))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,7 +86,8 @@ internal fun StaticMapPlaceholderPreview(
|
||||
StaticMapPlaceholder(
|
||||
showProgress = values,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(400.dp),
|
||||
width = 400.dp,
|
||||
height = 400.dp,
|
||||
onLoadMapClick = {},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ fun MessageComposerView(
|
||||
state.eventSink(MessageComposerEvents.FocusChanged(hasFocus))
|
||||
}
|
||||
|
||||
Box {
|
||||
Box(modifier = modifier) {
|
||||
AttachmentsBottomSheet(
|
||||
state = state,
|
||||
onSendLocationClicked = onSendLocationClicked,
|
||||
@@ -69,8 +69,7 @@ fun MessageComposerView(
|
||||
onAddAttachment = ::onAddAttachment,
|
||||
onFocusChanged = ::onFocusChanged,
|
||||
composerCanSendMessage = state.isSendButtonVisible,
|
||||
composerText = state.text,
|
||||
modifier = modifier
|
||||
composerText = state.text
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ fun RoomInviteMembersView(
|
||||
onSendPressed: (List<MatrixUser>) -> Unit = {},
|
||||
) {
|
||||
Scaffold(
|
||||
modifier = modifier,
|
||||
topBar = {
|
||||
RoomInviteMembersTopBar(
|
||||
onBackPressed = {
|
||||
@@ -79,7 +80,7 @@ fun RoomInviteMembersView(
|
||||
}
|
||||
) { padding ->
|
||||
Column(
|
||||
modifier = modifier
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(padding)
|
||||
.consumeWindowInsets(padding),
|
||||
|
||||
@@ -76,6 +76,7 @@ fun RoomMemberListView(
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
modifier = modifier,
|
||||
topBar = {
|
||||
if (!state.isSearchActive) {
|
||||
RoomMemberListTopBar(
|
||||
@@ -87,7 +88,7 @@ fun RoomMemberListView(
|
||||
}
|
||||
) { padding ->
|
||||
Column(
|
||||
modifier = modifier
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(padding)
|
||||
.consumeWindowInsets(padding),
|
||||
|
||||
@@ -50,9 +50,9 @@ internal fun RequestVerificationHeader(
|
||||
onDismissClicked: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Box(modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp)) {
|
||||
Box(modifier = modifier.padding(horizontal = 16.dp, vertical = 8.dp)) {
|
||||
Surface(
|
||||
modifier.fillMaxWidth(),
|
||||
Modifier.fillMaxWidth(),
|
||||
shape = MaterialTheme.shapes.small,
|
||||
color = MaterialTheme.colorScheme.surfaceVariant
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user