Make unit converter parsing more lenient and add units of volume

Close #1323
This commit is contained in:
MM20
2025-10-05 22:36:20 +02:00
parent f508ac65b5
commit 9205025761
8 changed files with 322 additions and 22 deletions

View File

@@ -39,6 +39,7 @@ import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import de.mm20.launcher2.icons.Cube
import de.mm20.launcher2.search.data.CurrencyUnitConverter
import de.mm20.launcher2.search.data.UnitConverter
import de.mm20.launcher2.ui.R
@@ -220,7 +221,7 @@ fun getDimensionIcon(dimension: Dimension): ImageVector {
Dimension.Mass -> Icons.Rounded.FitnessCenter
Dimension.Length -> Icons.Rounded.Straighten
Dimension.Velocity -> Icons.Rounded.Speed
Dimension.Volume -> TODO()
Dimension.Volume -> Icons.Rounded.Cube
Dimension.Area -> Icons.Rounded.SquareFoot
Dimension.Currency -> Icons.Rounded.Toll
Dimension.Data -> Icons.Rounded.Storage

View File

@@ -714,7 +714,7 @@ fun CustomizeCustomIntent(viewModel: EditSearchActionSheetVM) {
supportingText = {
Text(
if (action.queryKey == null) {
"The URI template that is used to construct the intent\\'s data URI. Use \${1} as a placeholder for the actual search term, e.g. geo:0,0?q=,\${1}"
"The URI template that is used to construct the intent\\'s data URI. Use \${1} as a placeholder for the actual search term"
} else {
"The template that is used to construct the string that is passed to the intent as a string extra. Use \${1} as a placeholder for the actual search term"
}