Skip to content

Commit

Permalink
Add limit to 2.0 in Playback speed, phone limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
GravityDarkLab committed Jan 29, 2024
1 parent 2e6bcdb commit ab60063
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/views/settings_view/custom_playback_speed_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void showAddCustomSpeedDialog(
errorMessage = '';
} else {
double? parsedValue = double.tryParse(value);
if (parsedValue != null && parsedValue >= 0.25 && parsedValue <= 4.0) {
if (parsedValue != null && parsedValue >= 0.25 && parsedValue <= 2.0) {
List<String> splitValue = value.split('.');
if ((splitValue[0].length > 1) ||
(splitValue.length > 1 && splitValue[1].length > 2)) {
Expand All @@ -24,7 +24,7 @@ void showAddCustomSpeedDialog(
customSpeed = parsedValue;
}
} else {
errorMessage = 'Please enter a number between\n0.25 and 4.0';
errorMessage = 'Please enter a number between\n0.25 and 2.0';
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/views/settings_view/playback_speed_picker_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void showPlaybackSpeedsPicker(
List<double> selectedSpeeds,
Function(double, bool) updateSelectedSpeeds,
) {
List<double> defaultSpeeds = List.generate(14, (index) => (index + 1) * 0.25);
List<double> defaultSpeeds = List.generate(8, (index) => (index + 1) * 0.25);

if (!selectedSpeeds.contains(1.0)) {
selectedSpeeds.add(1.0);
Expand Down

0 comments on commit ab60063

Please sign in to comment.