From bb11f2da01c1e1a782665efa37e7ead681435edd Mon Sep 17 00:00:00 2001 From: Martijn van Dijk Date: Wed, 6 Jan 2021 19:30:28 +0100 Subject: [PATCH] Fix first trigger of mediaitem changed --- Directory.Build.props | 2 +- MediaManager/Queue/MediaQueue.cs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index b3c3927e..6f1792b3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,7 @@ https://github.com/Baseflow/XamarinMediaManager git $(AssemblyName) ($(TargetFramework)) - 1.0.7 + 1.0.8 8.0 diff --git a/MediaManager/Queue/MediaQueue.cs b/MediaManager/Queue/MediaQueue.cs index 217c2764..8384dfed 100644 --- a/MediaManager/Queue/MediaQueue.cs +++ b/MediaManager/Queue/MediaQueue.cs @@ -105,13 +105,11 @@ public int CurrentIndex get => _currentIndex; set { - if (SetProperty(ref _currentIndex, value)) + SetProperty(ref _currentIndex, value); + if (Current != null) { - if (Current != null) - { - OnQueueChanged(this, new QueueChangedEventArgs(Current)); - MediaManager.OnMediaItemChanged(this, new MediaItemEventArgs(Current)); - } + OnQueueChanged(this, new QueueChangedEventArgs(Current)); + MediaManager.OnMediaItemChanged(this, new MediaItemEventArgs(Current)); } } }