Compare commits

...

2 Commits

Author SHA1 Message Date
Jonas Bark
586b17c2d2 version++ 2026-01-29 16:22:46 +01:00
Jonas Bark
4909a1a47f fix issue when duplicating keymap 2026-01-29 16:22:32 +01:00
2 changed files with 9 additions and 5 deletions

View File

@@ -247,9 +247,11 @@ class KeymapManager {
} else {
final customApp = CustomApp(profileName: newName);
final connectedDevice = core.connection.devices.firstOrNull;
final connectedDeviceButtons = IterableFlatMap(
core.connection.controllerDevices,
).flatMap((e) => e.availableButtons).toSet();
core.actionHandler.supportedApp!.keymap.keyPairs.forEachIndexed((pair, index) {
pair.buttons.filter((button) => connectedDevice?.availableButtons.contains(button) == true).forEachIndexed((
pair.buttons.filter((button) => connectedDeviceButtons.contains(button) == true).forEachIndexed((
button,
indexB,
) {
@@ -288,9 +290,11 @@ class KeymapManager {
} else {
final customApp = CustomApp(profileName: newName);
final connectedDevice = core.connection.devices.firstOrNull;
final connectedDeviceButtons = IterableFlatMap(
core.connection.controllerDevices,
).flatMap((e) => e.availableButtons).toSet();
core.actionHandler.supportedApp!.keymap.keyPairs.forEachIndexed((pair, index) {
pair.buttons.filter((button) => connectedDevice?.availableButtons.contains(button) == true).forEachIndexed((
pair.buttons.filter((button) => connectedDeviceButtons.contains(button) == true).forEachIndexed((
button,
indexB,
) {

View File

@@ -1,7 +1,7 @@
name: bike_control
description: "BikeControl - Control your virtual riding"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 4.6.1+90
version: 4.6.2+91
environment:
sdk: ^3.9.0