Tiny code clean up

This commit is contained in:
Sad Ellie 2022-06-19 16:20:43 +03:00
parent e3f70653c0
commit ab4fbaee52
3 changed files with 2 additions and 10 deletions

View File

@ -198,7 +198,7 @@ fun Sequence<AbstractUnit>.sortByLev(stringA: String): Sequence<AbstractUnit> {
/**
* 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
* names than the search query
*

View File

@ -19,21 +19,13 @@
package com.sadellie.unitto.screens.second.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
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.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
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
/**

View File

@ -30,7 +30,7 @@ import java.math.BigDecimal
class AllUnitsTest {
// 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()
@Test