mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Show current item in player bar
This commit is contained in:
parent
232faa6a2f
commit
2d4f3d73cf
6 changed files with 53 additions and 27 deletions
|
|
@ -49,12 +49,13 @@ mod imp {
|
|||
let playlist_page = MusicusPlaylistPage::new(&self.player);
|
||||
self.stack.add_named(&playlist_page, Some("playlist"));
|
||||
|
||||
playlist_page.connect_close(clone!(@weak player_bar => move |_| {
|
||||
let stack = self.stack.get();
|
||||
playlist_page.connect_close(clone!(@weak player_bar, @weak stack => move |_| {
|
||||
stack.set_visible_child_name("navigation");
|
||||
player_bar.playlist_hidden();
|
||||
}));
|
||||
|
||||
let stack = self.stack.get();
|
||||
player_bar.connect_show_playlist(clone!(@weak playlist_page => move |_, show| {
|
||||
player_bar.connect_show_playlist(clone!(@weak playlist_page, @weak stack => move |_, show| {
|
||||
if show {
|
||||
playlist_page.scroll_to_current();
|
||||
stack.set_visible_child_name("playlist");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue