Skip to content

Commit fe796ae

Browse files
authored
Merge pull request #2571 from UltimateHackingKeyboard/fix-check-host-connect
fix: check host connections are paired only when UHK80 device connected
2 parents 9729225 + f701bdd commit fe796ae

File tree

1 file changed

+8
-2
lines changed
  • packages/uhk-web/src/app/store/effects

1 file changed

+8
-2
lines changed

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import {
1616
shouldUpgradeAgent,
1717
shouldUpgradeFirmware,
1818
UdevRulesInfo,
19+
UHK_60_DEVICE,
20+
UHK_60_V2_DEVICE,
1921
UHK_80_DEVICE,
2022
UserConfiguration
2123
} from 'uhk-common';
@@ -116,8 +118,12 @@ export class DeviceEffects {
116118
checkAreHostConnectionsPaired$ = createEffect(() => this.actions$
117119
.pipe(
118120
ofType(ActionTypes.CheckAreHostConnectionsPaired, DongleActions.DonglePairingSuccess),
119-
withLatestFrom(this.store.select(getHostConnections)),
120-
tap(([_, hostConnections]) => {
121+
withLatestFrom(this.store.select(getConnectedDevice), this.store.select(getHostConnections)),
122+
tap(([_, connectedDevice, hostConnections]) => {
123+
if (connectedDevice?.id === UHK_60_DEVICE.id || connectedDevice?.id === UHK_60_V2_DEVICE.id) {
124+
return
125+
}
126+
121127
const addresses = [];
122128
for (const hostConnection of hostConnections) {
123129
if (hostConnection.hasAddress()) {

0 commit comments

Comments
 (0)