Browse Source

QR code: force inclusion of primary channel

pull/39/head
Sacha Weatherstone 4 years ago
parent
commit
26dbe0c032
No known key found for this signature in database GPG Key ID: 7AB2D7E206124B31
  1. 10
      src/components/Dialog/QRDialog.tsx

10
src/components/Dialog/QRDialog.tsx

@ -67,7 +67,10 @@ export const QRDialog = ({
{channels.map((channel) => (
<Checkbox
key={channel.index}
disabled={channel.role === Protobuf.Channel_Role.DISABLED}
disabled={
channel.index === 0 ||
channel.role === Protobuf.Channel_Role.DISABLED
}
label={
channel.settings?.name.length
? channel.settings.name
@ -75,7 +78,10 @@ export const QRDialog = ({
? "Primary"
: `Channel: ${channel.index}`
}
checked={selectedChannels.includes(channel.index)}
checked={
channel.index === 0 ||
selectedChannels.includes(channel.index)
}
onChange={() => {
if (selectedChannels.includes(channel.index)) {
setSelectedChannels(

Loading…
Cancel
Save