Skip to content

Commit d78e79a

Browse files
authored
TheShovel/CustomStyles: fix list scrolling getter (TurboWarp#2262)
- The menu value didn't match what the block wanted so it always reported empty string - The name was confusing - Even if you manually put the right text in, it would report the wrong thing if you didn't run the set list scrolling block before running the getter
1 parent c3f4425 commit d78e79a

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

‎extensions/TheShovel/CustomStyles.js‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@
728728
value: "ask prompt button image",
729729
},
730730
{
731-
text: Scratch.translate("list scroll rule"),
732-
value: "list scroll rule",
731+
text: Scratch.translate("list scrolling"),
732+
value: "list scrolling",
733733
},
734734
],
735735
},
@@ -915,11 +915,17 @@
915915
return askInputRoundness;
916916
} else if (args.ITEM === "ask prompt button image") {
917917
return askButtonImage;
918-
} else if (args.ITEM === "list scrolling") {
919-
if (allowScrolling === "auto") {
920-
return "enabled";
921-
} else {
918+
} else if (
919+
args.ITEM === "list scrolling" ||
920+
// Old version of this extension had "list scroll rule" in the menu so
921+
// we'll support either.
922+
// https://github.com/TurboWarp/extensions/pull/2262
923+
args.ITEM === "list scroll rule"
924+
) {
925+
if (allowScrolling === "hidden") {
922926
return "disabled";
927+
} else {
928+
return "enabled";
923929
}
924930
}
925931
return "";

0 commit comments

Comments
 (0)