Skip to content

Commit 9572773

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents bb6b436 + defea69 commit 9572773

3 files changed

Lines changed: 23 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
## Fixed
1010

11+
- #2154 The expert mode debug screen is now only accessible after the expert mode warning has been acknowledged.
1112
- #2074 Scrolling the action or trigger list no longer accidentally moves items; reordering by drag now only activates from the drag handle or via long-press.
1213

1314
## Changed

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -252,34 +252,34 @@ private fun Content(
252252
)
253253
}
254254
}
255+
256+
Spacer(modifier = Modifier.height(16.dp))
257+
258+
OptionsHeaderRow(
259+
modifier = Modifier
260+
.fillMaxWidth()
261+
.padding(horizontal = 16.dp),
262+
icon = Icons.Outlined.BugReport,
263+
text = stringResource(R.string.settings_section_debugging_title),
264+
)
265+
266+
Spacer(modifier = Modifier.height(8.dp))
267+
268+
OptionPageButton(
269+
modifier = Modifier.padding(horizontal = 8.dp),
270+
title = stringResource(R.string.title_pref_get_event_debug),
271+
text = stringResource(R.string.summary_pref_get_event_debug),
272+
icon = Icons.Outlined.BugReport,
273+
onClick = onGetEventClick,
274+
)
275+
Spacer(modifier = Modifier.height(8.dp))
255276
} else {
256277
Text(
257278
modifier = Modifier.padding(horizontal = 32.dp),
258279
text = stringResource(R.string.expert_mode_settings_unavailable_text),
259280
textAlign = TextAlign.Center,
260281
)
261282
}
262-
263-
Spacer(modifier = Modifier.height(16.dp))
264-
265-
OptionsHeaderRow(
266-
modifier = Modifier
267-
.fillMaxWidth()
268-
.padding(horizontal = 16.dp),
269-
icon = Icons.Outlined.BugReport,
270-
text = stringResource(R.string.settings_section_debugging_title),
271-
)
272-
273-
Spacer(modifier = Modifier.height(8.dp))
274-
275-
OptionPageButton(
276-
modifier = Modifier.padding(horizontal = 8.dp),
277-
title = stringResource(R.string.title_pref_get_event_debug),
278-
text = stringResource(R.string.summary_pref_get_event_debug),
279-
icon = Icons.Outlined.BugReport,
280-
onClick = onGetEventClick,
281-
)
282-
Spacer(modifier = Modifier.height(8.dp))
283283
}
284284
}
285285

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ class ExpertModeViewModel @Inject constructor(
190190

191191
fun onGetEventClick() {
192192
viewModelScope.launch {
193+
if (warningState.value !is ExpertModeWarningState.Understood) return@launch
193194
navigate("get_event_debug", NavDestination.GetEvent)
194195
}
195196
}

0 commit comments

Comments
 (0)