diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-12-29 13:46:58 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-12-29 13:46:58 -0800 |
commit | e4ab715a425bdf7fff81a4125c81c8e268eb0d70 (patch) | |
tree | ca294588a244bf0fc58957efeee3d361b5707e07 /src | |
parent | 451d880c7e7085f5f01916d79396dfdaaeb8f071 (diff) | |
download | dsub-e4ab715a425bdf7fff81a4125c81c8e268eb0d70.tar.gz dsub-e4ab715a425bdf7fff81a4125c81c8e268eb0d70.tar.bz2 dsub-e4ab715a425bdf7fff81a4125c81c8e268eb0d70.zip |
#173 Forgot to add setting to disable share tab
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicActivity.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java index 77a592bb..b7e5eac8 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -80,7 +80,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte private String[] drawerItemsDescriptions;
private String[] drawerItems;
private boolean drawerIdle = true;
- private boolean[] enabledItems = {true, true, true};
+ private boolean[] enabledItems = {true, true, true, true};
private boolean destroyed = false;
private boolean finished = false;
protected List<SubsonicFragment> backStack = new ArrayList<SubsonicFragment>();
@@ -378,7 +378,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte boolean sharedEnabled = prefs.getBoolean(Constants.PREFERENCES_KEY_SHARED_ENABLED, true) && !Util.isOffline(this);
boolean chatEnabled = prefs.getBoolean(Constants.PREFERENCES_KEY_CHAT_ENABLED, true) && !Util.isOffline(this);
- if(drawerItems == null || !enabledItems[0] == podcastsEnabled || !enabledItems[1] == bookmarksEnabled || !enabledItems[2] == chatEnabled) {
+ if(drawerItems == null || !enabledItems[0] == podcastsEnabled || !enabledItems[1] == bookmarksEnabled || !enabledItems[2] == sharedEnabled || !enabledItems[3] == chatEnabled) {
drawerItems = getResources().getStringArray(R.array.drawerItems);
drawerItemsDescriptions = getResources().getStringArray(R.array.drawerItemsDescriptions);
@@ -415,7 +415,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte }
// Selectively remove shared listing [5]
- if(!bookmarksEnabled) {
+ if(!sharedEnabled) {
drawerItemsList.remove(5 - alreadyRemoved);
drawerItemsDescriptionsList.remove(5 - alreadyRemoved);
drawerItemsIconsList.remove(5 - alreadyRemoved);
@@ -439,7 +439,8 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte drawerList.setAdapter(new DrawerAdapter(this, drawerItemsList, drawerItemsIconsList));
enabledItems[0] = podcastsEnabled;
enabledItems[1] = bookmarksEnabled;
- enabledItems[2] = chatEnabled;
+ enabledItems[2] = sharedEnabled;
+ enabledItems[3] = chatEnabled;
}
}
|