diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-05-24 08:48:16 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-05-24 08:48:16 -0700 |
commit | e0aa0774ae962afdcfbfe4cd40d3c77aa55c61fb (patch) | |
tree | b7d8cd07b34060673adf2d5ece1b3db323489140 /subsonic-android/src | |
parent | df400f57394badb6f249205074662ac3a00e6da5 (diff) | |
download | dsub-e0aa0774ae962afdcfbfe4cd40d3c77aa55c61fb.tar.gz dsub-e0aa0774ae962afdcfbfe4cd40d3c77aa55c61fb.tar.bz2 dsub-e0aa0774ae962afdcfbfe4cd40d3c77aa55c61fb.zip |
Added option to disable chat menu
Diffstat (limited to 'subsonic-android/src')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java | 5 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/util/Constants.java | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java index 16036bf1..059db330 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java @@ -152,7 +152,10 @@ public class MainActivity extends SubsonicActivity { addTab("Home", MainFragment.class, null); addTab("Library", SelectArtistFragment.class, null); addTab("Playlists", SelectPlaylistFragment.class, null); - addTab("Chat", ChatFragment.class, null); + SharedPreferences prefs = Util.getPreferences(this); + if(prefs.getBoolean(Constants.PREFERENCES_KEY_CHAT_ENABLED, true)) { + addTab("Chat", ChatFragment.class, null); + } getSupportActionBar().setDisplayHomeAsUpEnabled(false); getSupportActionBar().setHomeButtonEnabled(false); diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Constants.java b/subsonic-android/src/github/daneren2005/dsub/util/Constants.java index e82b8111..29c9a1aa 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/Constants.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/Constants.java @@ -102,6 +102,7 @@ public final class Constants { public static final String PREFERENCES_KEY_GAPLESS_PLAYBACK = "gaplessPlayback"; public static final String PREFERENCES_KEY_SHUFFLE_MODE = "shuffleMode"; public static final String PREFERENCES_KEY_CHAT_REFRESH = "chatRefreshRate"; + public static final String PREFERENCES_KEY_CHAT_ENABLED = "chatEnabled"; public static final String MAIN_BACK_STACK = "backStackIds"; public static final String MAIN_BACK_STACK_SIZE = "backStackIdsSize"; |