Moved music playing controls from individual viewmodels to main view

This commit is contained in:
watsonb8
2019-12-04 20:42:23 -08:00
parent 187de97503
commit 3576a906e2
7 changed files with 145 additions and 148 deletions

View File

@ -4,8 +4,6 @@ using System.Threading;
using Grpc.Core;
using Aurora.Models.Media;
using Aurora.Proto.Sync;
using Aurora.Proto.Events;
using Aurora.Proto.Party;
using LibVLCSharp.Shared;
namespace Aurora.Services.PlayerService
@ -234,7 +232,10 @@ namespace Aurora.Services.PlayerService
/// <param name="args"></param>
private void OnStopped(object sender, EventArgs args)
{
PlaybackStateChanged.Invoke(this, new PlaybackStateChangedEventArgs(_state, PlaybackState.Stopped));
if (PlaybackStateChanged != null)
{
PlaybackStateChanged.Invoke(this, new PlaybackStateChangedEventArgs(_state, PlaybackState.Stopped));
}
_state = PlaybackState.Stopped;
this.Unload();
}