Skip to content

Commit dd3ea73

Browse files
committed
style: reformat
1 parent 64df6f1 commit dd3ea73

File tree

29 files changed

+184
-183
lines changed

29 files changed

+184
-183
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ object ActionDataEntityMapper {
274274

275275
ActionId.VOLUME_INCREASE_STREAM,
276276
ActionId.VOLUME_DECREASE_STREAM,
277-
-> {
277+
-> {
278278
val stream =
279279
entity.extras.getData(ActionEntity.EXTRA_STREAM_TYPE).then {
280280
VOLUME_STREAM_MAP.getKey(it)!!.success()
@@ -299,7 +299,7 @@ object ActionDataEntityMapper {
299299
ActionId.VOLUME_TOGGLE_MUTE,
300300
ActionId.VOLUME_UNMUTE,
301301
ActionId.VOLUME_MUTE,
302-
-> {
302+
-> {
303303
val showVolumeUi =
304304
entity.flags.hasFlag(ActionEntity.ACTION_FLAG_SHOW_VOLUME_UI)
305305

@@ -320,7 +320,7 @@ object ActionDataEntityMapper {
320320
ActionId.TOGGLE_FLASHLIGHT,
321321
ActionId.ENABLE_FLASHLIGHT,
322322
ActionId.CHANGE_FLASHLIGHT_STRENGTH,
323-
-> {
323+
-> {
324324
val lens = entity.extras.getData(ActionEntity.EXTRA_LENS).then {
325325
LENS_MAP.getKey(it)!!.success()
326326
}.valueOrNull() ?: return null
@@ -346,7 +346,7 @@ object ActionDataEntityMapper {
346346
}
347347

348348
ActionId.DISABLE_FLASHLIGHT,
349-
-> {
349+
-> {
350350
val lens = entity.extras.getData(ActionEntity.EXTRA_LENS).then {
351351
LENS_MAP.getKey(it)!!.success()
352352
}.valueOrNull() ?: return null
@@ -355,7 +355,7 @@ object ActionDataEntityMapper {
355355

356356
ActionId.TOGGLE_DND_MODE,
357357
ActionId.ENABLE_DND_MODE,
358-
-> {
358+
-> {
359359
val dndMode = entity.extras.getData(ActionEntity.EXTRA_DND_MODE).then {
360360
DND_MODE_MAP.getKey(it)!!.success()
361361
}.valueOrNull() ?: return null
@@ -385,7 +385,7 @@ object ActionDataEntityMapper {
385385
ActionId.STOP_MEDIA_PACKAGE,
386386
ActionId.STEP_FORWARD_PACKAGE,
387387
ActionId.STEP_BACKWARD_PACKAGE,
388-
-> {
388+
-> {
389389
val packageName =
390390
entity.extras.getData(ActionEntity.EXTRA_PACKAGE_NAME).valueOrNull()
391391
?: return null

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,16 @@ class ChooseActionViewModel @Inject constructor(
199199
val messageToShow: Int? = when (id) {
200200
ActionId.FAST_FORWARD_PACKAGE,
201201
ActionId.FAST_FORWARD,
202-
-> R.string.action_fast_forward_message
202+
-> R.string.action_fast_forward_message
203203

204204
ActionId.REWIND_PACKAGE,
205205
ActionId.REWIND,
206-
-> R.string.action_rewind_message
206+
-> R.string.action_rewind_message
207207

208208
ActionId.TOGGLE_KEYBOARD,
209209
ActionId.SHOW_KEYBOARD,
210210
ActionId.HIDE_KEYBOARD,
211-
-> R.string.action_toggle_keyboard_message
211+
-> R.string.action_toggle_keyboard_message
212212

213213
ActionId.SECURE_LOCK_DEVICE -> R.string.action_secure_lock_device_message
214214

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class ConfigActionsUseCaseImpl @Inject constructor(
2727
private val preferenceRepository: PreferenceRepository,
2828
private val configConstraints: ConfigConstraintsUseCase,
2929
defaultKeyMapOptionsUseCase: GetDefaultKeyMapOptionsUseCase,
30-
) : ConfigActionsUseCase, GetDefaultKeyMapOptionsUseCase by defaultKeyMapOptionsUseCase {
30+
) : ConfigActionsUseCase,
31+
GetDefaultKeyMapOptionsUseCase by defaultKeyMapOptionsUseCase {
3132

3233
override val keyMap: StateFlow<State<KeyMap>> = state.keyMap
3334

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ class PerformActionsUseCaseImpl @AssistedInject constructor(
203203
}
204204
} else {
205205
result = inputEventHub.injectKeyEvent(
206-
model, useSystemBridgeIfAvailable = injectKeyEventsWithSystemBridge.value,
206+
model,
207+
useSystemBridgeIfAvailable = injectKeyEventsWithSystemBridge.value,
207208
)
208209
}
209210
}

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,14 @@ private fun ShellCommandConfigurationContent(
366366
keyboardController?.hide()
367367
onTestClick()
368368
},
369-
enabled = !state.isRunning && (
370-
state.executionMode != ShellExecutionMode.ADB ||
371-
(
372-
state.executionMode == ShellExecutionMode.ADB &&
373-
state.proModeStatus == ProModeStatus.ENABLED
374-
)
375-
),
369+
enabled = !state.isRunning &&
370+
(
371+
state.executionMode != ShellExecutionMode.ADB ||
372+
(
373+
state.executionMode == ShellExecutionMode.ADB &&
374+
state.proModeStatus == ProModeStatus.ENABLED
375+
)
376+
),
376377
) {
377378
Icon(Icons.Rounded.PlayArrow, contentDescription = null)
378379
Spacer(modifier = Modifier.width(8.dp))

base/src/main/java/io/github/sds100/keymapper/base/constraints/ChooseConstraintViewModel.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ class ChooseConstraintViewModel @Inject constructor(
137137
ConstraintId.APP_NOT_IN_FOREGROUND,
138138
ConstraintId.APP_PLAYING_MEDIA,
139139
ConstraintId.APP_NOT_PLAYING_MEDIA,
140-
-> onSelectAppConstraint(constraintType)
140+
-> onSelectAppConstraint(constraintType)
141141

142142
ConstraintId.MEDIA_PLAYING -> returnResult.emit(ConstraintData.MediaPlaying)
143143
ConstraintId.MEDIA_NOT_PLAYING -> returnResult.emit(ConstraintData.NoMediaPlaying)
144144

145145
ConstraintId.BT_DEVICE_CONNECTED,
146146
ConstraintId.BT_DEVICE_DISCONNECTED,
147-
-> onSelectBluetoothConstraint(
147+
-> onSelectBluetoothConstraint(
148148
constraintType,
149149
)
150150

@@ -185,13 +185,13 @@ class ChooseConstraintViewModel @Inject constructor(
185185

186186
ConstraintId.WIFI_CONNECTED,
187187
ConstraintId.WIFI_DISCONNECTED,
188-
-> onSelectWifiConnectedConstraint(
188+
-> onSelectWifiConnectedConstraint(
189189
constraintType,
190190
)
191191

192192
ConstraintId.IME_CHOSEN,
193193
ConstraintId.IME_NOT_CHOSEN,
194-
-> onSelectImeChosenConstraint(constraintType)
194+
-> onSelectImeChosenConstraint(constraintType)
195195

196196
ConstraintId.DEVICE_IS_LOCKED ->
197197
returnResult.emit(ConstraintData.DeviceIsLocked)

base/src/main/java/io/github/sds100/keymapper/base/constraints/ConstraintErrorSnapshot.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class LazyConstraintErrorSnapshot(
6464

6565
is ConstraintData.BtDeviceConnected,
6666
is ConstraintData.BtDeviceDisconnected,
67-
-> {
67+
-> {
6868
if (!systemFeatureAdapter.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)) {
6969
return KMError.SystemFeatureNotSupported(PackageManager.FEATURE_BLUETOOTH)
7070
}
@@ -77,7 +77,7 @@ class LazyConstraintErrorSnapshot(
7777
is ConstraintData.OrientationCustom,
7878
ConstraintData.OrientationLandscape,
7979
ConstraintData.OrientationPortrait,
80-
->
80+
->
8181
if (!isPermissionGranted(Permission.WRITE_SETTINGS)) {
8282
return SystemError.PermissionDenied(Permission.WRITE_SETTINGS)
8383
}

base/src/main/java/io/github/sds100/keymapper/base/constraints/ConstraintUtils.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ object ConstraintUtils {
3434
ConstraintId.APP_NOT_IN_FOREGROUND,
3535
ConstraintId.APP_PLAYING_MEDIA,
3636
ConstraintId.APP_NOT_PLAYING_MEDIA,
37-
-> ComposeIconInfo.Vector(Icons.Rounded.Android)
37+
-> ComposeIconInfo.Vector(Icons.Rounded.Android)
3838

3939
ConstraintId.MEDIA_PLAYING -> ComposeIconInfo.Vector(Icons.Outlined.PlayArrow)
4040
ConstraintId.MEDIA_NOT_PLAYING -> ComposeIconInfo.Vector(Icons.Outlined.StopCircle)
@@ -44,11 +44,11 @@ object ConstraintUtils {
4444

4545
ConstraintId.ORIENTATION_0,
4646
ConstraintId.ORIENTATION_180,
47-
-> ComposeIconInfo.Vector(Icons.Outlined.StayCurrentPortrait)
47+
-> ComposeIconInfo.Vector(Icons.Outlined.StayCurrentPortrait)
4848

4949
ConstraintId.ORIENTATION_90,
5050
ConstraintId.ORIENTATION_270,
51-
-> ComposeIconInfo.Vector(Icons.Outlined.StayCurrentLandscape)
51+
-> ComposeIconInfo.Vector(Icons.Outlined.StayCurrentLandscape)
5252

5353
ConstraintId.ORIENTATION_LANDSCAPE -> ComposeIconInfo.Vector(Icons.Outlined.StayCurrentLandscape)
5454
ConstraintId.ORIENTATION_PORTRAIT -> ComposeIconInfo.Vector(Icons.Outlined.StayCurrentPortrait)
@@ -66,7 +66,7 @@ object ConstraintUtils {
6666

6767
ConstraintId.IME_CHOSEN,
6868
ConstraintId.IME_NOT_CHOSEN,
69-
-> ComposeIconInfo.Vector(Icons.Outlined.Keyboard)
69+
-> ComposeIconInfo.Vector(Icons.Outlined.Keyboard)
7070

7171
ConstraintId.DEVICE_IS_LOCKED -> ComposeIconInfo.Vector(Icons.Outlined.Lock)
7272
ConstraintId.DEVICE_IS_UNLOCKED -> ComposeIconInfo.Vector(Icons.Outlined.LockOpen)

base/src/main/java/io/github/sds100/keymapper/base/detection/KeyMapAlgorithm.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ class KeyMapAlgorithm(
18571857
KeyEvent.KEYCODE_SYM,
18581858
KeyEvent.KEYCODE_NUM,
18591859
KeyEvent.KEYCODE_FUNCTION,
1860-
-> true
1860+
-> true
18611861

18621862
else -> false
18631863
}

base/src/main/java/io/github/sds100/keymapper/base/home/KeyMapListViewModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class KeyMapListViewModel(
121121
isPaused = false,
122122
),
123123
listItems = State.Loading,
124-
showCreateKeyMapTapTarget = false
124+
showCreateKeyMapTapTarget = false,
125125
)
126126
private val _state: MutableStateFlow<KeyMapListState> = MutableStateFlow(initialState)
127127
val state = _state.asStateFlow()
@@ -325,7 +325,7 @@ class KeyMapListViewModel(
325325
combine(
326326
listItemStateFlow,
327327
appBarStateFlow,
328-
showCreateKeyMapTapTarget
328+
showCreateKeyMapTapTarget,
329329
) { listState, appBarState, showCreateKeyMapTapTarget ->
330330
Triple(listState, appBarState, showCreateKeyMapTapTarget)
331331
}.collectLatest { (listState, appBarState, showCreateKeyMapTapTarget) ->
@@ -339,7 +339,7 @@ class KeyMapListViewModel(
339339
KeyMapListState(
340340
appBarState,
341341
listState,
342-
showCreateKeyMapTapTarget
342+
showCreateKeyMapTapTarget,
343343
)
344344
}
345345
}

0 commit comments

Comments
 (0)