Remove unnecessary variables

This commit is contained in:
Chumva 2019-12-11 09:29:36 +02:00
parent c44da1728a
commit 5778ca03d3

View file

@ -993,8 +993,7 @@ class TelegramSettings(private val app: TelegramApplication) {
override fun getCurrentValue() = getFormattedValue(minLocationDistance) override fun getCurrentValue() = getFormattedValue(minLocationDistance)
override fun setCurrentValue(index: Int) { override fun setCurrentValue(index: Int) {
val value = MIN_LOCATION_DISTANCE[index] minLocationDistance = MIN_LOCATION_DISTANCE[index]
minLocationDistance = value
} }
override fun getMenuItems() = MIN_LOCATION_DISTANCE.map { getFormattedValue(it) } override fun getMenuItems() = MIN_LOCATION_DISTANCE.map { getFormattedValue(it) }
@ -1011,8 +1010,7 @@ class TelegramSettings(private val app: TelegramApplication) {
override fun getCurrentValue() = getFormattedValue(minLocationAccuracy) override fun getCurrentValue() = getFormattedValue(minLocationAccuracy)
override fun setCurrentValue(index: Int) { override fun setCurrentValue(index: Int) {
val value = MIN_LOCATION_ACCURACY[index] minLocationAccuracy = MIN_LOCATION_ACCURACY[index]
minLocationAccuracy = value
} }
override fun getMenuItems() = MIN_LOCATION_ACCURACY.map { getFormattedValue(it) } override fun getMenuItems() = MIN_LOCATION_ACCURACY.map { getFormattedValue(it) }
@ -1029,8 +1027,7 @@ class TelegramSettings(private val app: TelegramApplication) {
override fun getCurrentValue() = getFormattedValue(minLocationSpeed) override fun getCurrentValue() = getFormattedValue(minLocationSpeed)
override fun setCurrentValue(index: Int) { override fun setCurrentValue(index: Int) {
val value = MIN_LOCATION_SPEED[index] minLocationSpeed = MIN_LOCATION_SPEED[index]
minLocationSpeed = value
} }
override fun getMenuItems() = MIN_LOCATION_SPEED.map { getFormattedValue(it) } override fun getMenuItems() = MIN_LOCATION_SPEED.map { getFormattedValue(it) }