No need to use trick for night resource when using DayNightPreviews annotation.
This commit is contained in:
committed by
Benoit Marty
parent
9013bb6f1d
commit
2ffdf4483a
@@ -119,7 +119,6 @@ fun StaticMapView(
|
||||
showProgress = painter.state is AsyncImagePainter.State.Loading,
|
||||
contentDescription = contentDescription,
|
||||
modifier = Modifier.size(width = maxWidth, height = maxHeight),
|
||||
darkMode = darkMode,
|
||||
onLoadMapClick = { retryHash++ }
|
||||
)
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
|
||||
@Composable
|
||||
@@ -46,17 +45,13 @@ internal fun StaticMapPlaceholder(
|
||||
showProgress: Boolean,
|
||||
contentDescription: String?,
|
||||
modifier: Modifier = Modifier,
|
||||
darkMode: Boolean = !ElementTheme.isLightTheme,
|
||||
onLoadMapClick: () -> Unit,
|
||||
) {
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(
|
||||
id = if (darkMode) R.drawable.blurred_map_dark
|
||||
else R.drawable.blurred_map_light
|
||||
),
|
||||
painter = painterResource(id = R.drawable.blurred_map),
|
||||
contentDescription = contentDescription,
|
||||
modifier = modifier,
|
||||
contentScale = ContentScale.FillBounds,
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Reference in New Issue
Block a user