Implemented tag refresh on a playlist. Made audio file scanning truly asynchronous. Added basic playlist sorting functionality.
This commit is contained in:
@@ -35,6 +35,28 @@ public sealed partial class PlaylistDetailView : UserControl
|
||||
{
|
||||
item.DataContextChanged += Item_DataContextChanged;
|
||||
}
|
||||
|
||||
foreach (SortItem sortItem in _viewModel.SortItems)
|
||||
{
|
||||
SortByMenuFlyoutSubItem.Items.Add(new MenuFlyoutItem
|
||||
{
|
||||
Text = sortItem.Name,
|
||||
Command = _viewModel.SortAllCommand,
|
||||
CommandParameter = sortItem
|
||||
});
|
||||
|
||||
SortSelectedByMenuFlyoutSubItem.Items.Add(new MenuFlyoutItem
|
||||
{
|
||||
Text = sortItem.Name,
|
||||
Command = _viewModel.SortSelectedCommand,
|
||||
CommandParameter = sortItem
|
||||
});
|
||||
}
|
||||
|
||||
_viewModel.SortSelectedCommand.CanExecuteChanged += (_, _) =>
|
||||
SortSelectedByMenuFlyoutSubItem.IsEnabled = _viewModel.SortSelectedCommand.CanExecute(null);
|
||||
|
||||
SortSelectedByMenuFlyoutSubItem.IsEnabled = _viewModel.SortSelectedCommand.CanExecute(null);
|
||||
}
|
||||
|
||||
private void OnViewModelPropertyChanging(object? sender, PropertyChangingEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user