@@ -22,6 +22,7 @@ import io.github.sds100.keymapper.system.camera.CameraLens
2222import io.github.sds100.keymapper.system.intents.IntentExtraModel
2323import io.github.sds100.keymapper.system.intents.IntentTarget
2424import io.github.sds100.keymapper.system.network.HttpMethod
25+ import io.github.sds100.keymapper.system.settings.SettingType
2526import io.github.sds100.keymapper.system.volume.DndMode
2627import io.github.sds100.keymapper.system.volume.RingerMode
2728import io.github.sds100.keymapper.system.volume.VolumeStream
@@ -50,6 +51,7 @@ object ActionDataEntityMapper {
5051
5152 ActionEntity .Type .INTERACT_UI_ELEMENT -> ActionId .INTERACT_UI_ELEMENT
5253 ActionEntity .Type .SHELL_COMMAND -> ActionId .SHELL_COMMAND
54+ ActionEntity .Type .MODIFY_SETTING -> ActionId .MODIFY_SETTING
5355 }
5456
5557 return when (actionId) {
@@ -732,11 +734,9 @@ object ActionDataEntityMapper {
732734 .valueOrNull() ? : " SYSTEM" // Default to SYSTEM for backward compatibility
733735
734736 val settingType = try {
735- io.github.sds100.keymapper.system.settings.SettingType .valueOf(
736- settingTypeString,
737- )
738- } catch (e: IllegalArgumentException ) {
739- io.github.sds100.keymapper.system.settings.SettingType .SYSTEM
737+ SettingType .valueOf(settingTypeString)
738+ } catch (_: IllegalArgumentException ) {
739+ SettingType .SYSTEM
740740 }
741741
742742 ActionData .ModifySetting (
@@ -771,6 +771,7 @@ object ActionDataEntityMapper {
771771 is ActionData .Sound -> ActionEntity .Type .SOUND
772772 is ActionData .InteractUiElement -> ActionEntity .Type .INTERACT_UI_ELEMENT
773773 is ActionData .ShellCommand -> ActionEntity .Type .SHELL_COMMAND
774+ is ActionData .ModifySetting -> ActionEntity .Type .MODIFY_SETTING
774775 else -> ActionEntity .Type .SYSTEM_ACTION
775776 }
776777
0 commit comments