Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
xou816 committed Nov 29, 2024
1 parent 9b443ac commit 02db3ae
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/app/components/playback/playback_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,21 @@ impl PlaybackWidget {
let debouncer = Debouncer::new();
let widget = self.imp();
widget.seek_bar.set_increments(5_000.0, 10_000.0);
widget.seek_bar.connect_change_value(
clone!(#[weak(rename_to = _self)] self, #[upgrade_or] glib::Propagation::Proceed, move |_, _, requested| {
_self.imp()
widget.seek_bar.connect_change_value(clone!(
#[weak(rename_to = _self)]
self,
#[upgrade_or]
glib::Propagation::Proceed,
move |_, _, requested| {
_self
.imp()
.track_position
.set_text(&format_duration(requested));
let seek = seek.clone();
debouncer.debounce(200, move || seek(requested as u32));
glib::Propagation::Proceed
}),
);
}
));
}

pub fn set_playing(&self, is_playing: bool) {
Expand Down

0 comments on commit 02db3ae

Please sign in to comment.