Removed decimals from calculated scale

This commit is contained in:
Abdelilah El Aissaoui 2022-08-06 02:14:19 +02:00
parent ef384007d3
commit 914edc9aa7

View File

@ -205,9 +205,9 @@ fun UiSettings(settingsViewModel: SettingsViewModel) {
var matchingOption = options.firstOrNull { it.value == scaleUi } var matchingOption = options.firstOrNull { it.value == scaleUi }
if (matchingOption == null) { // Scale that we haven't taken in considerations if (matchingOption == null) { // Scale that we haven't taken in consideration
// Create a new scale and add it to the options list // Create a new scale and add it to the options list
matchingOption = ScaleDropDown(scaleUi, "${scaleUi * 100}%") matchingOption = ScaleDropDown(scaleUi, "${(scaleUi * 100).toInt()}%")
val newOptions = options.toMutableList() val newOptions = options.toMutableList()
newOptions.add(matchingOption) newOptions.add(matchingOption)
newOptions.sortBy { it.value } newOptions.sortBy { it.value }