Tweak usage weights alphas
This commit is contained in:
parent
c37b280d29
commit
832ff67320
@ -216,9 +216,9 @@ internal class FavoritesRepositoryImpl(
|
|||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
val weightFactor =
|
val weightFactor =
|
||||||
when (dataStore.data.map { it.resultOrdering.weightFactor }.firstOrNull()) {
|
when (dataStore.data.map { it.resultOrdering.weightFactor }.firstOrNull()) {
|
||||||
WeightFactor.Low -> 0.1
|
WeightFactor.Low -> WEIGHT_FACTOR_LOW
|
||||||
WeightFactor.High -> 0.5
|
WeightFactor.High -> WEIGHT_FACTOR_HIGH
|
||||||
else -> 0.2
|
else -> WEIGHT_FACTOR_MEDIUM
|
||||||
}
|
}
|
||||||
val item = SavedSearchable(searchable.key, searchable, 0, 0, false, 0.0)
|
val item = SavedSearchable(searchable.key, searchable, 0, 0, false, 0.0)
|
||||||
item.toDatabaseEntity()?.let {
|
item.toDatabaseEntity()?.let {
|
||||||
@ -433,4 +433,10 @@ internal class FavoritesRepositoryImpl(
|
|||||||
job.join()
|
job.join()
|
||||||
return removed
|
return removed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val WEIGHT_FACTOR_LOW = 0.01
|
||||||
|
private const val WEIGHT_FACTOR_MEDIUM = 0.05
|
||||||
|
private const val WEIGHT_FACTOR_HIGH = 0.1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user