Multiple theme support & fixes

This commit is contained in:
Sacha Weatherstone
2022-12-29 23:45:16 +11:00
parent 5022bda660
commit dab158c7b3
61 changed files with 2462 additions and 581 deletions
+9 -14
View File
@@ -518,23 +518,18 @@ export const useDeviceStore = create<DeviceState>((set, get) => ({
);
},
ackMessage: (channelIndex: number, messageId: number) => {
console.log("ack called");
set(
produce<DeviceState>((draft) => {
const device = draft.devices.get(id);
if (device) {
const channel = device.channels.find(
(ch) => ch.config.index === channelIndex
);
if (channel) {
const message = channel.messages.find(
(msg) => msg.packet.id === messageId
);
if (message) {
message.ack = true;
}
}
const channel = device?.channels.find(
(ch) => ch.config.index === channelIndex
);
const message = channel?.messages.find(
(msg) => msg.packet.id === messageId
);
if (message) {
message.ack = true;
}
})
);