Remove stringResource() id named argument (#3618)

This commit is contained in:
Phil Oliver 2025-11-04 21:36:26 -05:00 committed by GitHub
parent 828edc653f
commit a687328f08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 196 additions and 224 deletions

View file

@ -55,7 +55,7 @@ fun CacheLayout(
.padding(8.dp),
) {
Text(
text = stringResource(id = R.string.map_select_download_region),
text = stringResource(R.string.map_select_download_region),
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
style = MaterialTheme.typography.headlineSmall,
@ -75,13 +75,10 @@ fun CacheLayout(
horizontalArrangement = Arrangement.spacedBy(space = 8.dp),
) {
Button(onClick = onCancelDownload, modifier = Modifier.weight(1f)) {
Text(text = stringResource(id = R.string.cancel), color = MaterialTheme.colorScheme.onPrimary)
Text(text = stringResource(R.string.cancel), color = MaterialTheme.colorScheme.onPrimary)
}
Button(onClick = onExecuteJob, modifier = Modifier.weight(1f)) {
Text(
text = stringResource(id = R.string.map_start_download),
color = MaterialTheme.colorScheme.onPrimary,
)
Text(text = stringResource(R.string.map_start_download), color = MaterialTheme.colorScheme.onPrimary)
}
}
}

View file

@ -69,7 +69,7 @@ fun MapControlsOverlay(
if (isNodeMap) {
MapButton(
icon = Icons.Outlined.Tune,
contentDescription = stringResource(id = R.string.map_filter),
contentDescription = stringResource(R.string.map_filter),
onClick = onToggleMapFilterMenu,
)
NodeMapFilterDropdown(
@ -81,7 +81,7 @@ fun MapControlsOverlay(
Box {
MapButton(
icon = Icons.Outlined.Tune,
contentDescription = stringResource(id = R.string.map_filter),
contentDescription = stringResource(R.string.map_filter),
onClick = onToggleMapFilterMenu,
)
MapFilterDropdown(
@ -95,7 +95,7 @@ fun MapControlsOverlay(
Box {
MapButton(
icon = Icons.Outlined.Map,
contentDescription = stringResource(id = R.string.map_tile_source),
contentDescription = stringResource(R.string.map_tile_source),
onClick = onToggleMapTypeMenu,
)
MapTypeDropdown(
@ -108,7 +108,7 @@ fun MapControlsOverlay(
MapButton(
icon = Icons.Outlined.Layers,
contentDescription = stringResource(id = R.string.manage_map_layers),
contentDescription = stringResource(R.string.manage_map_layers),
onClick = onManageLayersClicked,
)
@ -121,7 +121,7 @@ fun MapControlsOverlay(
} else {
Icons.Outlined.MyLocation
},
contentDescription = stringResource(id = R.string.toggle_my_position),
contentDescription = stringResource(R.string.toggle_my_position),
onClick = onToggleLocationTracking,
)
}
@ -137,7 +137,7 @@ private fun CompassButton(onClick: () -> Unit, bearing: Float, isFollowing: Bool
modifier = Modifier.rotate(-bearing),
icon = icon,
iconTint = MaterialTheme.colorScheme.StatusRed.takeIf { bearing == 0f },
contentDescription = stringResource(id = R.string.orient_north),
contentDescription = stringResource(R.string.orient_north),
onClick = onClick,
)
}

View file

@ -50,10 +50,10 @@ internal fun MapFilterDropdown(expanded: Boolean, onDismissRequest: () -> Unit,
val mapFilterState by mapViewModel.mapFilterStateFlow.collectAsStateWithLifecycle()
DropdownMenu(expanded = expanded, onDismissRequest = onDismissRequest) {
DropdownMenuItem(
text = { Text(stringResource(id = R.string.only_favorites)) },
text = { Text(stringResource(R.string.only_favorites)) },
onClick = { mapViewModel.toggleOnlyFavorites() },
leadingIcon = {
Icon(imageVector = Icons.Filled.Star, contentDescription = stringResource(id = R.string.only_favorites))
Icon(imageVector = Icons.Filled.Star, contentDescription = stringResource(R.string.only_favorites))
},
trailingIcon = {
Checkbox(
@ -63,13 +63,10 @@ internal fun MapFilterDropdown(expanded: Boolean, onDismissRequest: () -> Unit,
},
)
DropdownMenuItem(
text = { Text(stringResource(id = R.string.show_waypoints)) },
text = { Text(stringResource(R.string.show_waypoints)) },
onClick = { mapViewModel.toggleShowWaypointsOnMap() },
leadingIcon = {
Icon(
imageVector = Icons.Filled.Place,
contentDescription = stringResource(id = R.string.show_waypoints),
)
Icon(imageVector = Icons.Filled.Place, contentDescription = stringResource(R.string.show_waypoints))
},
trailingIcon = {
Checkbox(
@ -79,12 +76,12 @@ internal fun MapFilterDropdown(expanded: Boolean, onDismissRequest: () -> Unit,
},
)
DropdownMenuItem(
text = { Text(stringResource(id = R.string.show_precision_circle)) },
text = { Text(stringResource(R.string.show_precision_circle)) },
onClick = { mapViewModel.toggleShowPrecisionCircleOnMap() },
leadingIcon = {
Icon(
imageVector = Icons.Outlined.RadioButtonUnchecked, // Placeholder icon
contentDescription = stringResource(id = R.string.show_precision_circle),
contentDescription = stringResource(R.string.show_precision_circle),
)
},
trailingIcon = {

View file

@ -46,10 +46,10 @@ internal fun MapTypeDropdown(
val googleMapTypes =
listOf(
stringResource(id = R.string.map_type_normal) to MapType.NORMAL,
stringResource(id = R.string.map_type_satellite) to MapType.SATELLITE,
stringResource(id = R.string.map_type_terrain) to MapType.TERRAIN,
stringResource(id = R.string.map_type_hybrid) to MapType.HYBRID,
stringResource(R.string.map_type_normal) to MapType.NORMAL,
stringResource(R.string.map_type_satellite) to MapType.SATELLITE,
stringResource(R.string.map_type_terrain) to MapType.TERRAIN,
stringResource(R.string.map_type_hybrid) to MapType.HYBRID,
)
DropdownMenu(expanded = expanded, onDismissRequest = onDismissRequest) {