mirror of
https://github.com/4sval/FModel.git
synced 2026-05-07 13:31:58 -05:00
Stop playback if removed file was currently playing file
This commit is contained in:
parent
f21060105d
commit
749790b1de
|
|
@ -283,6 +283,13 @@ public class AudioPlayerViewModel : ViewModel, ISource, IDisposable
|
|||
if (_audioFiles.Count < 1) return;
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
var removedPlaying = false;
|
||||
if (PlayedFile.Id == SelectedAudioFile.Id)
|
||||
{
|
||||
removedPlaying = true;
|
||||
Stop();
|
||||
}
|
||||
|
||||
_audioFiles.RemoveAt(SelectedAudioFile.Id);
|
||||
for (var i = 0; i < _audioFiles.Count; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user