Skip to content

Commit 1b32b70

Browse files
committed
#1440 fix: do not show button not detected bottom sheet repeatedly
1 parent bf9e4fc commit 1b32b70

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/io/github/sds100/keymapper/mappings/keymaps/trigger/BaseConfigTriggerViewModel.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ abstract class BaseConfigTriggerViewModel(
273273
}
274274
}
275275

276-
recordTrigger.state.onEach { state ->
276+
// Drop the first state in case it is in the Completed state so the
277+
// "button not detected" bottom sheet isn't shown when
278+
// the screen is opened.
279+
recordTrigger.state.drop(1).onEach { state ->
277280
if (state is RecordTriggerState.Completed &&
278281
state.recordedKeys.isEmpty() &&
279282
onboarding.showNoKeysDetectedBottomSheet.first() &&

0 commit comments

Comments
 (0)