Skip to content

Commit c5e18af

Browse files
committed
style: reformat with ktlint
1 parent 9c418fb commit c5e18af

File tree

8 files changed

+27
-24
lines changed

8 files changed

+27
-24
lines changed

base/src/main/java/io/github/sds100/keymapper/base/actions/ActionData.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,11 +768,16 @@ sealed class ActionData : Comparable<ActionData> {
768768
override val id = ActionId.MOVE_CURSOR
769769

770770
enum class Type {
771-
CHAR, WORD, LINE, PARAGRAPH, PAGE
771+
CHAR,
772+
WORD,
773+
LINE,
774+
PARAGRAPH,
775+
PAGE,
772776
}
773777

774778
enum class Direction {
775-
START, END
779+
START,
780+
END,
776781
}
777782
}
778783

base/src/main/java/io/github/sds100/keymapper/base/actions/ActionDataEntityMapper.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ object ActionDataEntityMapper {
611611
if (entity.extras.isEmpty()) {
612612
return ActionData.MoveCursor(
613613
moveType = ActionData.MoveCursor.Type.PAGE,
614-
ActionData.MoveCursor.Direction.END
614+
ActionData.MoveCursor.Direction.END,
615615
)
616616
}
617617

@@ -967,7 +967,6 @@ object ActionDataEntityMapper {
967967
add(EntityExtra(ActionEntity.EXTRA_MOVE_CURSOR_DIRECTION, directionString))
968968
}
969969

970-
971970
else -> emptyList()
972971
}
973972

base/src/main/java/io/github/sds100/keymapper/base/actions/ActionErrorSnapshot.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class LazyActionErrorSnapshot(
7575
val isCurrentImeCompatible =
7676
KeyMapperImeHelper.isKeyMapperInputMethod(
7777
currentImeFromActions.packageName,
78-
buildConfigProvider.packageName
78+
buildConfigProvider.packageName,
7979
)
8080

8181
if (isCurrentImeCompatible) {
@@ -200,7 +200,6 @@ class LazyActionErrorSnapshot(
200200
return isGranted
201201
}
202202
}
203-
204203
}
205204

206205
interface ActionErrorSnapshot {

base/src/main/java/io/github/sds100/keymapper/base/actions/ActionUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ fun ActionData.isEditable(): Boolean = when (this) {
851851
is ActionData.PhoneCall,
852852
is ActionData.HttpRequest,
853853
is ActionData.InteractUiElement,
854-
is ActionData.MoveCursor
854+
is ActionData.MoveCursor,
855855
-> true
856856

857857
else -> false

base/src/main/java/io/github/sds100/keymapper/base/actions/CreateActionDelegate.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -817,52 +817,52 @@ class CreateActionDelegate(
817817
val choices = listOf(
818818
ActionData.MoveCursor(
819819
ActionData.MoveCursor.Type.CHAR,
820-
ActionData.MoveCursor.Direction.START
820+
ActionData.MoveCursor.Direction.START,
821821
) to getString(R.string.action_move_cursor_prev_character),
822822

823823
ActionData.MoveCursor(
824824
ActionData.MoveCursor.Type.CHAR,
825-
ActionData.MoveCursor.Direction.END
825+
ActionData.MoveCursor.Direction.END,
826826
) to getString(R.string.action_move_cursor_next_character),
827827

828828
ActionData.MoveCursor(
829829
ActionData.MoveCursor.Type.WORD,
830-
ActionData.MoveCursor.Direction.START
830+
ActionData.MoveCursor.Direction.START,
831831
) to getString(R.string.action_move_cursor_start_word),
832832

833833
ActionData.MoveCursor(
834834
ActionData.MoveCursor.Type.WORD,
835-
ActionData.MoveCursor.Direction.END
835+
ActionData.MoveCursor.Direction.END,
836836
) to getString(R.string.action_move_cursor_end_word),
837837

838838
ActionData.MoveCursor(
839839
ActionData.MoveCursor.Type.LINE,
840-
ActionData.MoveCursor.Direction.START
840+
ActionData.MoveCursor.Direction.START,
841841
) to getString(R.string.action_move_cursor_start_line),
842842

843843
ActionData.MoveCursor(
844844
ActionData.MoveCursor.Type.LINE,
845-
ActionData.MoveCursor.Direction.END
845+
ActionData.MoveCursor.Direction.END,
846846
) to getString(R.string.action_move_cursor_end_line),
847847

848848
ActionData.MoveCursor(
849849
ActionData.MoveCursor.Type.PARAGRAPH,
850-
ActionData.MoveCursor.Direction.START
850+
ActionData.MoveCursor.Direction.START,
851851
) to getString(R.string.action_move_cursor_start_paragraph),
852852

853853
ActionData.MoveCursor(
854854
ActionData.MoveCursor.Type.PARAGRAPH,
855-
ActionData.MoveCursor.Direction.END
855+
ActionData.MoveCursor.Direction.END,
856856
) to getString(R.string.action_move_cursor_end_paragraph),
857857

858858
ActionData.MoveCursor(
859859
ActionData.MoveCursor.Type.PAGE,
860-
ActionData.MoveCursor.Direction.START
860+
ActionData.MoveCursor.Direction.START,
861861
) to getString(R.string.action_move_cursor_start_page),
862862

863863
ActionData.MoveCursor(
864864
ActionData.MoveCursor.Type.PAGE,
865-
ActionData.MoveCursor.Direction.END
865+
ActionData.MoveCursor.Direction.END,
866866
) to getString(R.string.action_move_cursor_end_page),
867867
)
868868

base/src/main/java/io/github/sds100/keymapper/base/actions/PerformActionsUseCase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,8 @@ class PerformActionsUseCaseImpl @AssistedInject constructor(
668668
actionType,
669669
mapOf(
670670
AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT to granularity,
671-
AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN to false
672-
)
671+
AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN to false,
672+
),
673673
)
674674
}
675675
}

base/src/test/java/io/github/sds100/keymapper/base/actions/GetActionErrorUseCaseTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class GetActionErrorUseCaseTest {
9393
val actions = listOf(
9494
ActionData.SwitchKeyboard(
9595
imeId = GUI_KEYBOARD_IME_INFO.id,
96-
GUI_KEYBOARD_IME_INFO.label
96+
GUI_KEYBOARD_IME_INFO.label,
9797
),
9898
ActionData.InputKeyEvent(keyCode = KeyEvent.KEYCODE_VOLUME_DOWN),
9999
)
@@ -112,7 +112,7 @@ class GetActionErrorUseCaseTest {
112112
val actions = listOf(
113113
ActionData.SwitchKeyboard(
114114
imeId = GUI_KEYBOARD_IME_INFO.id,
115-
GUI_KEYBOARD_IME_INFO.label
115+
GUI_KEYBOARD_IME_INFO.label,
116116
),
117117
ActionData.Text("hello"),
118118
)
@@ -131,7 +131,7 @@ class GetActionErrorUseCaseTest {
131131
val actions = listOf(
132132
ActionData.SwitchKeyboard(
133133
imeId = GUI_KEYBOARD_IME_INFO.id,
134-
GUI_KEYBOARD_IME_INFO.label
134+
GUI_KEYBOARD_IME_INFO.label,
135135
),
136136
ActionData.OpenCamera,
137137
ActionData.OpenSettings,
@@ -208,7 +208,7 @@ class GetActionErrorUseCaseTest {
208208
val actions = listOf(
209209
ActionData.SwitchKeyboard(
210210
imeId = GUI_KEYBOARD_IME_INFO.id,
211-
GUI_KEYBOARD_IME_INFO.label
211+
GUI_KEYBOARD_IME_INFO.label,
212212
),
213213
ActionData.SwitchKeyboard(imeId = GBOARD_IME_INFO.id, GBOARD_IME_INFO.label),
214214
ActionData.InputKeyEvent(keyCode = KeyEvent.KEYCODE_VOLUME_DOWN),

base/src/test/java/io/github/sds100/keymapper/base/system/inputmethod/FakeInputMethodAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ class FakeInputMethodAdapter : InputMethodAdapter {
4545
?.let { Success(it) }
4646
?: KMError.InputMethodNotFound(packageName)
4747
}
48-
}
48+
}

0 commit comments

Comments
 (0)