aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
index a6517bf6..5db79e99 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -428,7 +428,11 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
if(downloadService != null && downloadService.getSleepTimer()) {
int timeRemaining = downloadService.getSleepTimeRemaining();
timerMenu = menu.findItem(R.id.menu_toggle_timer);
- timerMenu.setTitle(context.getResources().getString(R.string.download_stop_time_remaining, Util.formatDuration(timeRemaining)));
+ if(timeRemaining > 1){
+ timerMenu.setTitle(context.getResources().getString(R.string.download_stop_time_remaining, Util.formatDuration(timeRemaining)));
+ } else {
+ timerMenu.setTitle(R.string.menu_set_timer);
+ }
}
if(downloadService != null && downloadService.getKeepScreenOn()) {
menu.findItem(R.id.menu_screen_on_off).setChecked(true);
@@ -1232,7 +1236,11 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
DownloadService downloadService = getDownloadService();
if(downloadService.getSleepTimer() && timerMenu != null) {
int timeRemaining = downloadService.getSleepTimeRemaining();
- timerMenu.setTitle(context.getResources().getString(R.string.download_stop_time_remaining, Util.formatDuration(timeRemaining)));
+ if(timeRemaining > 1){
+ timerMenu.setTitle(context.getResources().getString(R.string.download_stop_time_remaining, Util.formatDuration(timeRemaining)));
+ } else {
+ timerMenu.setTitle(R.string.menu_set_timer);
+ }
}
}