mirror of
https://github.com/zoriya/Opus.git
synced 2025-12-06 06:26:15 +00:00
Making the sleep timer use the new pause system.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user