diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-11-27 23:19:41 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-11-27 23:19:41 -0800 |
commit | 1c6ccd371250da82a2d6ab1296904d6e1e4fa2c1 (patch) | |
tree | 4d6c6318b357a343a018736fde73500d7a9b6e5d /subsonic-android/src | |
parent | 7c5eb3e1a1ab6b664ca23f03198eb73cffda29ce (diff) | |
download | dsub-1c6ccd371250da82a2d6ab1296904d6e1e4fa2c1.tar.gz dsub-1c6ccd371250da82a2d6ab1296904d6e1e4fa2c1.tar.bz2 dsub-1c6ccd371250da82a2d6ab1296904d6e1e4fa2c1.zip |
Fixed toggling timer/screen on not toggling the menu
Diffstat (limited to 'subsonic-android/src')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index 1c8afc87..52ea5b25 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -538,6 +538,13 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi inflater.inflate(R.menu.nowplaying, menu); else inflater.inflate(R.menu.nowplaying_downloading, menu); + + if(getDownloadService().getSleepTimer()) { + menu.findItem(R.id.menu_toggle_timer).setTitle(R.string.download_stop_timer); + } + if(getDownloadService().getKeepScreenOn()) { + menu.findItem(R.id.menu_screen_on_off).setTitle(R.string.download_menu_screen_off); + } } return true; } @@ -614,6 +621,7 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getDownloadService().setKeepScreenOn(true); } + invalidateOptionsMenu(); return true; case R.id.menu_shuffle: getDownloadService().shuffle(); @@ -635,6 +643,7 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi } else { getDownloadService().startSleepTimer(); } + invalidateOptionsMenu(); return true; case R.id.menu_exit: intent = new Intent(this, MainActivity.class); |