aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github/daneren2005
diff options
context:
space:
mode:
authorowner <owner@DeeDee-Laptop>2013-01-13 11:21:57 -0800
committerowner <owner@DeeDee-Laptop>2013-01-13 11:21:57 -0800
commit55cd3b3fee6ed97527496b402f85f5ed77f0919f (patch)
tree5f549578a4d11d4e18df921c5ab28a909b49f76a /subsonic-android/src/github/daneren2005
parent7f71b2fad2a640396a950316f2150f1cc7fb9c7c (diff)
downloaddsub-55cd3b3fee6ed97527496b402f85f5ed77f0919f.tar.gz
dsub-55cd3b3fee6ed97527496b402f85f5ed77f0919f.tar.bz2
dsub-55cd3b3fee6ed97527496b402f85f5ed77f0919f.zip
Give empty menu until data is loaded to avoid pressing buttons early and getting licenseInvalid error
Diffstat (limited to 'subsonic-android/src/github/daneren2005')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
index d85545b0..08b7804f 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
@@ -51,7 +51,7 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
private View emptyView;
private boolean hideButtons = false;
private Button moreButton;
- private boolean licenseValid;
+ private Boolean licenseValid;
private boolean showHeader = true;
/**
@@ -112,7 +112,10 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
- if(hideButtons) {
+ if(licenseValid == null) {
+ inflater.inflate(R.menu.empty, menu);
+ }
+ else if(hideButtons) {
String albumListType = getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_TYPE);
if(albumListType != null) {
inflater.inflate(R.menu.select_album_list, menu);