Skip to content

Commit

Permalink
fix: min track dur to restore pos not saving properly
Browse files Browse the repository at this point in the history
ref: #112
  • Loading branch information
MSOB7YY committed Jan 21, 2024
1 parent 2980827 commit ed02698
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/ui/widgets/settings/playback_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -711,14 +711,13 @@ class PlaybackSettings extends SettingSubpageProvider {
bgColor: getBgColor(_PlaybackSettingsKeys.minimumTrackDurToRestoreLastPosition),
icon: Broken.refresh_left_square,
title: lang.MIN_TRACK_DURATION_TO_RESTORE_LAST_POSITION,
trailing: NamidaWheelSlider(
trailing: NamidaWheelSlider<int>(
totalCount: max,
initValue: valInSet,
initValue: valInSet >= -1 ? max : valInSet,
itemSize: 2,
squeeze: 0.4,
onValueChanged: (val) {
final v = (val) as int;
settings.save(minTrackDurationToRestoreLastPosInMinutes: v >= max ? -1 : v);
settings.save(minTrackDurationToRestoreLastPosInMinutes: val >= max ? -1 : val);
},
text: valInSet == 0
? lang.ALWAYS_RESTORE
Expand Down

0 comments on commit ed02698

Please sign in to comment.