Show "Install plugin" dialog if speed cannot be changed
This commit is contained in:
parent
71468395b5
commit
322e445c96
|
@ -707,7 +707,10 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||||
|
|
||||||
if(butPlaybackSpeed != null) {
|
if(butPlaybackSpeed != null) {
|
||||||
butPlaybackSpeed.setOnClickListener(v -> {
|
butPlaybackSpeed.setOnClickListener(v -> {
|
||||||
if (controller != null && controller.canSetPlaybackSpeed()) {
|
if (controller == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (controller.canSetPlaybackSpeed()) {
|
||||||
String[] availableSpeeds = UserPreferences.getPlaybackSpeedArray();
|
String[] availableSpeeds = UserPreferences.getPlaybackSpeedArray();
|
||||||
String currentSpeed = UserPreferences.getPlaybackSpeed();
|
String currentSpeed = UserPreferences.getPlaybackSpeed();
|
||||||
|
|
||||||
|
@ -733,6 +736,8 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||||
}
|
}
|
||||||
UserPreferences.setPlaybackSpeed(newSpeed);
|
UserPreferences.setPlaybackSpeed(newSpeed);
|
||||||
controller.setPlaybackSpeed(Float.parseFloat(newSpeed));
|
controller.setPlaybackSpeed(Float.parseFloat(newSpeed));
|
||||||
|
} else {
|
||||||
|
VariableSpeedDialog.showDialog(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
butPlaybackSpeed.setOnLongClickListener(v -> {
|
butPlaybackSpeed.setOnLongClickListener(v -> {
|
||||||
|
|
Loading…
Reference in New Issue