Skip to content

Commit 4442850

Browse files
committed
Refactor made everything temporarily messier, but it works.
1 parent cd0cb55 commit 4442850

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/src/main/java/com/scribblej/tapstrapapp/TapController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ object TapController : TapAdapter {
9898
fun startMouseMode(exitCode: List<String> = listOf("01111")) {
9999
// We don't track an active TapStrap at this point so we just
100100
// treat multiples the same, if they exist.
101-
sdk.connectedTaps.forEach() { sd(it) }
101+
sdk.connectedTaps.forEach() { sdk.startControllerWithMouseHIDMode(it) }
102102
mouseModeActive = true
103103
ignoreInputUntilFromString(exitCode)
104104
}

app/src/main/java/com/scribblej/tapstrapapp/presentation/TapInputView.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ fun TapStateView(tapInputViewModel: TapInputViewModel) {
8484

8585
@Composable
8686
fun CommandListIndicator(tapInputViewModel: TapInputViewModel) {
87-
val tapCount = tapInputViewModel.tapCount.value
88-
val commandLists = tapInputViewModel.commandLists.value
87+
val tapCount by tapInputViewModel.tapCount.collectAsState()
88+
val commandLists by tapInputViewModel.commandLists.collectAsState()
89+
8990

9091
val screenWidth = LocalConfiguration.current.screenWidthDp.dp
9192
val padding = 16.dp

0 commit comments

Comments
 (0)