Skip to content

Commit

Permalink
fix: oneshot layer for 9 & 10 is now blocked as it does not work
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Parcet Gonzalez <alexpargon@gmail.com>
  • Loading branch information
alexpargon committed Sep 24, 2024
1 parent cdad2fb commit 723d31e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/renderer/modules/KeysTabs/LayersTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,13 @@ const LayersTab = ({
<>
<CustomRadioCheckBox
label={<div className="pl-0.5">Add a key on tap</div>}
disabled={activeLayerNumber >= 9}
onClick={() => {
if (activeLayerNumber > 0) {
if (activeLayerNumber > 0 && activeLayerNumber <= 8) {
setActiveLayerTab(previous => (previous === "layerDual" ? "layerShift" : "layerDual"));
setOpenKeysPopover(true);
} else if (activeLayerNumber >= 9) {
triggerToastOneShot();
} else {
triggerToast();
}
Expand All @@ -403,7 +406,6 @@ const LayersTab = ({
</p>
</>
}
disabled={false}
className=""
/>
<CustomRadioCheckBox
Expand Down

0 comments on commit 723d31e

Please sign in to comment.