Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.Clipboard
import androidx.compose.ui.platform.LocalClipboard
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
Expand Down Expand Up @@ -613,6 +614,7 @@ private fun ActiveFiltersSection(
modifier: Modifier = Modifier,
onClearFilter: (String) -> Unit,
) {
val locale = LocalConfiguration.current.locales[0]
Column(
modifier =
modifier
Expand Down Expand Up @@ -724,14 +726,14 @@ private fun ActiveFiltersSection(

dateRange.first != null -> {
"From ${
SimpleDateFormat("MMM dd", Locale.getDefault())
SimpleDateFormat("MMM dd", locale)
.format(Date(dateRange.first!!))
}"
}

else -> {
"Until ${
SimpleDateFormat("MMM dd", Locale.getDefault())
SimpleDateFormat("MMM dd", locale)
.format(Date(dateRange.second!!))
}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -46,6 +47,7 @@ internal fun FilterBottomSheetContent(
onClearFilters: () -> Unit,
onClose: () -> Unit,
) {
val locale = LocalConfiguration.current.locales[0]
Column(
modifier =
Modifier
Expand Down Expand Up @@ -158,7 +160,7 @@ internal fun FilterBottomSheetContent(
OutlinedTextField(
value =
if (currentState.dateRange.first != null) {
SimpleDateFormat("MMM dd, yyyy", Locale.getDefault())
SimpleDateFormat("MMM dd, yyyy", locale)
.format(Date(currentState.dateRange.first!!))
} else {
""
Expand All @@ -181,7 +183,7 @@ internal fun FilterBottomSheetContent(
OutlinedTextField(
value =
if (currentState.dateRange.second != null) {
SimpleDateFormat("MMM dd, yyyy", Locale.getDefault())
SimpleDateFormat("MMM dd, yyyy", locale)
.format(Date(currentState.dateRange.second!!))
} else {
""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ fun DeveloperPortalUi(
val scope = rememberCoroutineScope()

// Show snackbar when simulation result changes
state.simulationResult?.let { result ->
scope.launch {
LaunchedEffect(state.simulationResult) {
state.simulationResult?.let { result ->
snackbarHostState.showSnackbar(result)
}
}
Expand Down
Loading