@@ -175,7 +175,7 @@ fun SettingsScreen(modifier: Modifier = Modifier, viewModel: SettingsViewModel)
175175 }
176176 },
177177 onShareLogcatClick = viewModel::onShareLogcatClick,
178- onKeyEventActionMethodSelected = viewModel::onKeyEventActionMethodSelected
178+ onKeyEventActionMethodSelected = viewModel::onKeyEventActionMethodSelected,
179179 )
180180 }
181181}
@@ -251,13 +251,13 @@ private fun Content(
251251 onShareLogcatClick : () -> Unit = { },
252252 onHideHomeScreenAlertsToggled : (Boolean ) -> Unit = { },
253253 onShowDeviceDescriptorsToggled : (Boolean ) -> Unit = { },
254- onKeyEventActionMethodSelected : (isProModeSelected: Boolean ) -> Unit = {}
254+ onKeyEventActionMethodSelected : (isProModeSelected: Boolean ) -> Unit = {},
255255) {
256256 Column (
257257 modifier
258258 .verticalScroll(rememberScrollState())
259259 .padding(horizontal = 16 .dp),
260- verticalArrangement = Arrangement .spacedBy(8 .dp)
260+ verticalArrangement = Arrangement .spacedBy(8 .dp),
261261 ) {
262262 Spacer (modifier = Modifier .height(8 .dp))
263263
@@ -278,23 +278,20 @@ private fun Content(
278278 Theme .DARK to stringResource(R .string.theme_dark),
279279 )
280280
281-
282281 KeyMapperSegmentedButtonRow (
283282 modifier = Modifier .fillMaxWidth(),
284283 buttonStates,
285284 state.theme,
286285 onStateSelected = onThemeSelected,
287286 )
288287
289-
290288 OptionPageButton (
291289 title = stringResource(R .string.title_pref_show_toggle_keymaps_notification),
292290 text = stringResource(R .string.summary_pref_show_toggle_keymaps_notification),
293291 icon = Icons .Rounded .PlayCircleOutline ,
294292 onClick = onPauseResumeNotificationClick,
295293 )
296294
297-
298295 SwitchPreferenceCompose (
299296 title = stringResource(R .string.title_pref_hide_home_screen_alerts),
300297 text = stringResource(R .string.summary_pref_hide_home_screen_alerts),
@@ -303,22 +300,19 @@ private fun Content(
303300 onCheckedChange = onHideHomeScreenAlertsToggled,
304301 )
305302
306-
307303 OptionsHeaderRow (
308304 modifier = Modifier .fillMaxWidth(),
309305 icon = Icons .Outlined .Gamepad ,
310306 text = stringResource(R .string.settings_section_key_maps_title),
311307 )
312308
313-
314309 OptionPageButton (
315310 title = stringResource(R .string.title_pref_default_options),
316311 text = stringResource(R .string.summary_pref_default_options),
317312 icon = Icons .Rounded .Tune ,
318313 onClick = onDefaultOptionsClick,
319314 )
320315
321-
322316 SwitchPreferenceCompose (
323317 title = stringResource(R .string.title_pref_force_vibrate),
324318 text = stringResource(R .string.summary_pref_force_vibrate),
@@ -327,7 +321,6 @@ private fun Content(
327321 onCheckedChange = onForceVibrateToggled,
328322 )
329323
330-
331324 SwitchPreferenceCompose (
332325 title = stringResource(R .string.title_pref_show_device_descriptors),
333326 text = stringResource(R .string.summary_pref_show_device_descriptors),
@@ -336,14 +329,12 @@ private fun Content(
336329 onCheckedChange = onShowDeviceDescriptorsToggled,
337330 )
338331
339-
340332 OptionsHeaderRow (
341333 modifier = Modifier .fillMaxWidth(),
342334 icon = KeyMapperIcons .FolderManaged ,
343335 text = stringResource(R .string.settings_section_data_management_title),
344336 )
345337
346-
347338 OptionPageButton (
348339 title = if (state.autoBackupLocation == null ) {
349340 stringResource(R .string.title_pref_automatic_backup_location_disabled)
@@ -356,23 +347,20 @@ private fun Content(
356347 onClick = onAutomaticBackupClick,
357348 )
358349
359-
360350 OptionsHeaderRow (
361351 modifier = Modifier .fillMaxWidth(),
362352 icon = Icons .Rounded .Construction ,
363353 text = stringResource(R .string.settings_section_power_user_title),
364354 )
365355
366-
367356 KeyEventActionMethodRow (
368357 modifier = Modifier
369358 .fillMaxWidth()
370359 .padding(horizontal = 16 .dp),
371360 isProModeSelected = state.keyEventActionsUseSystemBridege,
372- onSelected = onKeyEventActionMethodSelected
361+ onSelected = onKeyEventActionMethodSelected,
373362 )
374363
375-
376364 OptionPageButton (
377365 title = stringResource(R .string.title_pref_pro_mode),
378366 text = if (isProModeSupported) {
@@ -403,14 +391,12 @@ private fun Content(
403391 enabled = isAutoSwitchImeSupported,
404392 )
405393
406-
407394 OptionsHeaderRow (
408395 modifier = Modifier .fillMaxWidth(),
409396 icon = Icons .Rounded .Code ,
410397 text = stringResource(R .string.settings_section_debugging_title),
411398 )
412399
413-
414400 SwitchPreferenceCompose (
415401 title = stringResource(R .string.title_pref_toggle_logging),
416402 text = stringResource(R .string.summary_pref_toggle_logging),
@@ -441,30 +427,30 @@ private fun Content(
441427private fun KeyEventActionMethodRow (
442428 modifier : Modifier = Modifier ,
443429 isProModeSelected : Boolean ,
444- onSelected : (isProModeSelected: Boolean ) -> Unit
430+ onSelected : (isProModeSelected: Boolean ) -> Unit ,
445431) {
446432 Column (modifier) {
447433 val buttonStates = listOf (
448434 false to stringResource(R .string.fix_key_event_action_input_method_title),
449- true to stringResource(R .string.pro_mode_app_bar_title)
435+ true to stringResource(R .string.pro_mode_app_bar_title),
450436 )
451437
452438 Text (
453439 text = stringResource(R .string.title_pref_key_event_actions_use_system_bridge),
454- style = MaterialTheme .typography.bodyLarge
440+ style = MaterialTheme .typography.bodyLarge,
455441 )
456442
457443 Text (
458444 text = stringResource(R .string.summary_pref_key_event_actions_use_system_bridge),
459- style = MaterialTheme .typography.bodyMedium
445+ style = MaterialTheme .typography.bodyMedium,
460446 )
461447
462448 Spacer (modifier = Modifier .height(8 .dp))
463449
464450 FlowRow (
465451 modifier = Modifier .fillMaxWidth(),
466452 horizontalArrangement = Arrangement .spacedBy(16 .dp),
467- verticalArrangement = Arrangement .spacedBy(4 .dp)
453+ verticalArrangement = Arrangement .spacedBy(4 .dp),
468454 ) {
469455 for ((isProMode, text) in buttonStates) {
470456 RadioButtonText (
@@ -487,4 +473,4 @@ private fun Preview() {
487473 )
488474 }
489475 }
490- }
476+ }
0 commit comments