mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
Small fix for rates < 1.0
This commit is contained in:
parent
57114ab7c5
commit
113a60a8ff
1 changed files with 4 additions and 4 deletions
|
|
@ -71,13 +71,13 @@ class VideoPlayerSettingsProviderNotifier extends StateNotifier<VideoPlayerSetti
|
|||
|
||||
void steppedSpeed(double i) {
|
||||
var value = double.parse(
|
||||
((ref.read(playbackRateProvider) + i).clamp(0.25, 3))
|
||||
.toStringAsFixed(2),
|
||||
((ref.read(playbackRateProvider) + i).clamp(0.25, 3)).toStringAsFixed(2),
|
||||
);
|
||||
|
||||
if ((value - 1.0).abs() < 0.1) {
|
||||
if ((value - 1.0).abs() <= 0.06) {
|
||||
value = 1.0;
|
||||
}
|
||||
|
||||
ref.read(playbackRateProvider.notifier).state = value;
|
||||
ref.read(videoPlayerProvider).setSpeed(value);
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ class VideoPlayerSettingsProviderNotifier extends StateNotifier<VideoPlayerSetti
|
|||
state = state.copyWith(allowedOrientations: orientation);
|
||||
|
||||
void setShortcuts(MapEntry<VideoHotKeys, KeyCombination> newEntry) {
|
||||
state = state.copyWith(hotKeys: state.hotKeys.setOrRemove(newEntry, state.defaultShortCuts));
|
||||
state = state.copyWith(hotKeys: state.hotKeys.setOrRemove(newEntry, state.defaultShortCuts));
|
||||
}
|
||||
|
||||
void nextChapter() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue