Omega-R / OmegaLint

3 stars 0 forks source link

Неверное выделение ветви when #38

Closed Just-D-A closed 3 years ago

Just-D-A commented 3 years ago

BaseSettingsMenu.DOOR_STATUS -> { SelectValueDialogFragment.createLauncher( doorStatuses, domofon.settings.base.doorStatus.ordinal ).launchForResult(REQUEST_CODE_DOOR_STATUS) }

Just-D-A commented 3 years ago
when (item) {
            BaseSettingsMenu.DOOR_STATUS -> {
                SelectValueDialogFragment.createLauncher(
                    doorStatuses, domofon.settings.base.doorStatus.ordinal
                ).launchForResult(REQUEST_CODE_DOOR_STATUS)
            }
            BaseSettingsMenu.RELAY_TYPE -> {
                SelectValueDialogFragment.createLauncher(
                    relayStatuses, domofon.settings.base.relayStatus.ordinal
                ).launchForResult(REQUEST_CODE_RELAY_TYPE)
            }
            BaseSettingsMenu.DOOR_OPEN_TIME -> {
                SelectValueDialogFragment.createLauncher(
                    DOOR_OPEN_TIME_VALUES.map { it.toString() }.toTypedArray(),
                    DOOR_OPEN_TIME_VALUES.indexOf(domofon.settings.base.doorOpenTime)
                ).launchForResult(REQUEST_CODE_DOOR_OPEN_TIME)
            }
            BaseSettingsMenu.CALL_TIME -> {
                InputValueActivity.createLauncher(
                    R.string.title_base_call_time, settings.callTime, MAX_CALL_TIME
                ).launchForResult(REQUEST_CODE_CALL_TIME)
            }
            BaseSettingsMenu.TALK_TIME -> {
                InputValueActivity.createLauncher(
                    R.string.title_base_talk_time, settings.talkTime, MAX_TALK_TIME
                ).launchForResult(REQUEST_CODE_TALK_TIME)
            }
            BaseSettingsMenu.CONCIERGE_APARTMENT -> {
                InputValueActivity.createLauncher(
                    R.string.title_base_concierge_apartment, settings.conciergeApartment, MAX_CONCIERGE_APARTMENT
                ).launchForResult(REQUEST_CODE_CONCIERGE_APARTMENT)
            }
        }