Skip to content

Commit 765b859

Browse files
committed
fix: check host connections are paired only when UHK80 device connected
1 parent 9729225 commit 765b859

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • packages/uhk-web/src/app/store/effects

packages/uhk-web/src/app/store/effects/device.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,12 @@ export class DeviceEffects {
116116
checkAreHostConnectionsPaired$ = createEffect(() => this.actions$
117117
.pipe(
118118
ofType(ActionTypes.CheckAreHostConnectionsPaired, DongleActions.DonglePairingSuccess),
119-
withLatestFrom(this.store.select(getHostConnections)),
120-
tap(([_, hostConnections]) => {
119+
withLatestFrom(this.store.select(getConnectedDevice), this.store.select(getHostConnections)),
120+
tap(([_, connectedDevice, hostConnections]) => {
121+
if (connectedDevice?.id !== UHK_80_DEVICE.id) {
122+
return
123+
}
124+
121125
const addresses = [];
122126
for (const hostConnection of hostConnections) {
123127
if (hostConnection.hasAddress()) {

0 commit comments

Comments
 (0)