Changing switch sintaxe to preserve compatibility with java 11 or minus (#4521)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -63,5 +63,8 @@
|
||||
"!**/*.tsbuildinfo",
|
||||
"!docs",
|
||||
"!examples"
|
||||
]
|
||||
}
|
||||
],
|
||||
"resolutions": {
|
||||
"react-native-test-app": "4.3.8"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user