Skip to content

Commit

Permalink
Fix action reorder save
Browse files Browse the repository at this point in the history
  • Loading branch information
Nain57 committed Aug 16, 2024
1 parent b8b413f commit 2c51cc9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ private fun Action.Click.toClickEntity(): ActionEntity =
ActionEntity(
id = id.databaseId,
eventId = eventId.databaseId,
priority = priority,
name = name!!,
type = ActionType.CLICK,
pressDuration = pressDuration,
Expand All @@ -56,6 +57,7 @@ private fun Action.Swipe.toSwipeEntity(): ActionEntity =
ActionEntity(
id = id.databaseId,
eventId = eventId.databaseId,
priority = priority,
name = name!!,
type = ActionType.SWIPE,
swipeDuration = swipeDuration,
Expand All @@ -69,6 +71,7 @@ private fun Action.Pause.toPauseEntity(): ActionEntity =
ActionEntity(
id = id.databaseId,
eventId = eventId.databaseId,
priority = priority,
name = name!!,
type = ActionType.PAUSE,
pauseDuration = pauseDuration,
Expand All @@ -78,6 +81,7 @@ private fun Action.Intent.toIntentEntity(): ActionEntity =
ActionEntity(
id = id.databaseId,
eventId = eventId.databaseId,
priority = priority,
name = name!!,
type = ActionType.INTENT,
isAdvanced = isAdvanced,
Expand All @@ -91,6 +95,7 @@ private fun Action.ToggleEvent.toToggleEventEntity(): ActionEntity =
ActionEntity(
id = id.databaseId,
eventId = eventId.databaseId,
priority = priority,
name = name!!,
type = ActionType.TOGGLE_EVENT,
toggleAllType = toggleAllType?.toEntity(),
Expand All @@ -101,6 +106,7 @@ private fun Action.ChangeCounter.toChangeCounterEntity(): ActionEntity =
ActionEntity(
id = id.databaseId,
eventId = eventId.databaseId,
priority = priority,
name = name!!,
type = ActionType.CHANGE_COUNTER,
counterName = counterName,
Expand Down

0 comments on commit 2c51cc9

Please sign in to comment.