Skip to content

Commit 86dc23e

Browse files
committed
style: extract long lines into separate method
1 parent 367c3c9 commit 86dc23e

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

base/src/main/java/io/github/sds100/keymapper/base/expertmode/SystemBridgeSetupAssistantController.kt

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -325,20 +325,7 @@ class SystemBridgeSetupAssistantController @AssistedInject constructor(
325325
} else {
326326
// Show a notification asking for pairing code straight away if interaction
327327
// is disabled.
328-
showNotification(
329-
title = getString(
330-
R.string.expert_mode_setup_notification_pairing_code_not_interactive_title,
331-
),
332-
text = getString(
333-
R.string.expert_mode_setup_notification_pairing_code_not_interactive_text,
334-
),
335-
actions = listOf(
336-
KMNotificationAction.RemoteInput.PairingCode to
337-
getString(
338-
R.string.expert_mode_setup_notification_action_input_pairing_code,
339-
),
340-
),
341-
)
328+
nonInteractivePairingCodeNotification()
342329

343330
interactionStep = null
344331
}
@@ -348,6 +335,23 @@ class SystemBridgeSetupAssistantController @AssistedInject constructor(
348335
}
349336
}
350337

338+
private fun nonInteractivePairingCodeNotification() {
339+
showNotification(
340+
title = getString(
341+
R.string.expert_mode_setup_notification_pairing_code_not_interactive_title,
342+
),
343+
text = getString(
344+
R.string.expert_mode_setup_notification_pairing_code_not_interactive_text,
345+
),
346+
actions = listOf(
347+
KMNotificationAction.RemoteInput.PairingCode to
348+
getString(
349+
R.string.expert_mode_setup_notification_action_input_pairing_code,
350+
),
351+
),
352+
)
353+
}
354+
351355
private fun startInteractionTimeoutJob() {
352356
interactionTimeoutJob?.cancel()
353357
interactionTimeoutJob = coroutineScope.launch {

0 commit comments

Comments
 (0)