Added tracking/capturing/restoration of audio playback state and position.
This commit is contained in:
@@ -56,6 +56,16 @@ public sealed partial class PlaylistDetailView : UserControl
|
||||
SortSelectedByMenuFlyoutSubItem.IsEnabled = _viewModel.SortSelectedCommand.CanExecute(null);
|
||||
|
||||
SortSelectedByMenuFlyoutSubItem.IsEnabled = _viewModel.SortSelectedCommand.CanExecute(null);
|
||||
|
||||
Loaded += OnLoaded;
|
||||
}
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Loaded -= OnLoaded;
|
||||
|
||||
// Defer until the ListView has completed its first layout/container realization pass.
|
||||
DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, BringPlayingSongIntoView);
|
||||
}
|
||||
|
||||
private void OnViewModelPropertyChanging(object? sender, PropertyChangingEventArgs e)
|
||||
@@ -274,7 +284,7 @@ public sealed partial class PlaylistDetailView : UserControl
|
||||
if (args.NewValue is not PlaylistSong playlistSong)
|
||||
return;
|
||||
|
||||
bool isPlaying = playlistSong == _viewModel.PlayingSong;
|
||||
bool isPlaying = playlistSong.UID == _viewModel.PlayingSong?.UID;
|
||||
|
||||
UpdateListViewItemStyle(sender, isPlaying);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user