mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Tiny code clean up
This commit is contained in:
parent
e3f70653c0
commit
ab4fbaee52
@ -198,7 +198,7 @@ fun Sequence<AbstractUnit>.sortByLev(stringA: String): Sequence<AbstractUnit> {
|
|||||||
/**
|
/**
|
||||||
* Levenshtein Distance for this specific name of this unit
|
* Levenshtein Distance for this specific name of this unit
|
||||||
*
|
*
|
||||||
* We use substring so that we compare not the whole unit name, but only part of it
|
* We use substring so that we compare not the whole unit name, but only part of it.
|
||||||
* It's required because without it levDist will be too high for units with longer
|
* It's required because without it levDist will be too high for units with longer
|
||||||
* names than the search query
|
* names than the search query
|
||||||
*
|
*
|
||||||
|
@ -19,21 +19,13 @@
|
|||||||
package com.sadellie.unitto.screens.second.components
|
package com.sadellie.unitto.screens.second.components
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
|
||||||
import androidx.compose.foundation.lazy.items
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.stringResource
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.sadellie.unitto.data.units.AbstractUnit
|
|
||||||
import com.sadellie.unitto.data.units.UnitGroup
|
|
||||||
import com.sadellie.unitto.screens.Formatter
|
|
||||||
import java.math.BigDecimal
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +30,7 @@ import java.math.BigDecimal
|
|||||||
class AllUnitsTest {
|
class AllUnitsTest {
|
||||||
|
|
||||||
// Group and it's tested unit ids
|
// Group and it's tested unit ids
|
||||||
var history: MutableMap<UnitGroup, Set<String>> = mutableMapOf()
|
private var history: MutableMap<UnitGroup, Set<String>> = mutableMapOf()
|
||||||
private val allUnitsRepository = AllUnitsRepository()
|
private val allUnitsRepository = AllUnitsRepository()
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user