Skip to content

WIP: add sleeptimer to fix #42

Daniel Frost requested to merge Danfro/music-app:sleeptimer into ubports/xenial

Fix #42 by adding a sleep timer.

I allowed a time between 1 and 60 minutes. When the timer elapses, music is stopped and the keep screen on option is deactivated. If the switch is activated but no music is played, a dialog with an error message pops up. The subtitles text updates the time when the slider is moved.

EDIT: I did remove the test and the disable option for keep screen on. That is not needed. The screen is only kept alive when music plays.

I placed it under settings because there is plenty of space ;-), settings button is appwide available and I did not want to add another button for that.

Click for testing: com.ubuntu.music_2.9.2.1_all.click

This is how it looks:

screenshot20200325_223513835

Edited by Guido Berhörster

Merge request reports