Changing switch sintaxe to preserve compatibility with java 11 or minus (#4521)

This commit is contained in:
BryanChemp
2025-05-07 09:27:34 -03:00
committed by GitHub
parent 987be4b293
commit 49173edd59
2 changed files with 15 additions and 7 deletions

View File

@@ -539,11 +539,16 @@ public class ReactExoplayerView extends FrameLayout implements
builder.setSingleChoiceItems(speedOptions, selectedSpeedIndex, (dialog, which) -> {
selectedSpeedIndex = which;
float speed = switch (which) {
case 0 -> 0.5f;
case 2 -> 1.5f;
case 3 -> 2.0f;
default -> 1.0f;
float speed = 1.0f;
switch (which) {
case 0:
speed = 0.5f;
case 2:
speed = 1.5f;
case 3:
speed = 2.0f;
default:
speed = 1.0f;;
};
setRateModifier(speed);
});

View File

@@ -63,5 +63,8 @@
"!**/*.tsbuildinfo",
"!docs",
"!examples"
]
}
],
"resolutions": {
"react-native-test-app": "4.3.8"
}
}