Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Feb 11, 2024
1 parent 18ae9c1 commit d871b89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion psst-gui/src/controller/playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl PlaybackController {

fn seek_relative(&mut self, data: &AppState, forward: bool) {
if let Some(now_playing) = &data.playback.now_playing {
let seek_duration = Duration::from_secs(data.config.step_duration as u64);
let seek_duration = Duration::from_secs(data.config.seek_duration as u64);

// Calculate new position, ensuring it does not exceed duration for forward seeks.
let seek_position = if forward {
Expand Down
4 changes: 2 additions & 2 deletions psst-gui/src/data/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub struct Config {
pub sort_order: SortOrder,
pub sort_criteria: SortCriteria,
pub paginated_limit: usize,
pub step_duration: usize,
pub seek_duration: usize,
}

impl Default for Config {
Expand All @@ -112,7 +112,7 @@ impl Default for Config {
sort_order: Default::default(),
sort_criteria: Default::default(),
paginated_limit: 500,
step_duration: 10,
seek_duration: 10,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions psst-gui/src/ui/preferences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ fn general_tab_widget() -> impl Widget<AppState> {
col = col.with_spacer(theme::grid(3.0));

col = col
.with_child(Label::new("Step Duration").with_font(theme::UI_FONT_MEDIUM))
.with_child(Label::new("Seek Duration").with_font(theme::UI_FONT_MEDIUM))
.with_spacer(theme::grid(2.0))
.with_child(
Flex::row()
Expand All @@ -223,7 +223,7 @@ fn general_tab_widget() -> impl Widget<AppState> {
)),
)
.padding((theme::grid(1.5), 0.0))
.lens(AppState::config.then(Config::step_duration)),
.lens(AppState::config.then(Config::seek_duration)),
);

col = col.with_spacer(theme::grid(3.0));
Expand Down

0 comments on commit d871b89

Please sign in to comment.