Making the sleep timer use the new pause system.

This commit is contained in:
Anonymus Raccoon
2019-06-18 10:55:13 +02:00
parent 863d8dc45f
commit 2508a196c9
2 changed files with 8 additions and 2 deletions

View File

@@ -1597,8 +1597,14 @@ namespace Opus.Api.Services
Player.instance?.Ready(); //Refresh play/pause state
}
private void SleepPause()
private async void SleepPause()
{
for (int i = 0; i < 25; i++)
{
player.Volume = (float)(player.Volume * 0.90);
await Task.Delay(10);
}
Stop(true);
}

View File

@@ -78,7 +78,7 @@ namespace Opus.Api.Services
notification.SetContentText(timer + " " + (timer > 1 ? GetString(Resource.String.minutes) : GetString(Resource.String.minute)));
notificationManager.Notify(1001, notification.Build());
await Task.Delay(60000); // One minute in ms
await Task.Delay(60000); //One minute in ms
timer -= 1;
}