Optimize conditional

This commit is contained in:
Andrew Rabert 2018-07-03 17:55:41 -04:00
parent e7953958da
commit c7f1fa8665
1 changed files with 3 additions and 4 deletions

View File

@ -324,11 +324,10 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
menu.findItem(R.id.menu_save_playlist).setEnabled(false); menu.findItem(R.id.menu_save_playlist).setEnabled(false);
} }
if (downloadService != null && downloadService.isRemovePlayed()) {
menu.findItem(R.id.menu_remove_played).setChecked(true);
}
if (downloadService != null) { if (downloadService != null) {
if (downloadService.isRemovePlayed()) {
menu.findItem(R.id.menu_remove_played).setChecked(true);
}
SharedPreferences prefs = Util.getPreferences(context); SharedPreferences prefs = Util.getPreferences(context);
boolean equalizerOn = prefs.getBoolean(Constants.PREFERENCES_EQUALIZER_ON, false); boolean equalizerOn = prefs.getBoolean(Constants.PREFERENCES_EQUALIZER_ON, false);
if (equalizerOn) { if (equalizerOn) {