Skip to content

Commit 1ccfd22

Browse files
committed
Fix: Only trigger onType event if ClickID and UCID matches
1 parent 77ce56f commit 1ccfd22

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/lib/renderer/inSim/elements/Button.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,11 @@ export class Button extends InSimElement {
473473
this.log(`add onType listener`);
474474

475475
const onTypeListener = (bttPacket: IS_BTT, inSim: InSim) => {
476-
if (this.packet.ClickID === bttPacket.ClickID) {
476+
if (
477+
this.packet.ClickID === bttPacket.ClickID &&
478+
(this.packet.UCID === bttPacket.UCID ||
479+
this.packet.UCID === Button.UCID_ALL)
480+
) {
477481
onType(bttPacket, inSim);
478482
}
479483
};

0 commit comments

Comments
 (0)