diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-02-01 20:10:23 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-02-01 20:10:23 -0800 |
commit | b77174762ee353d42eeda155299b5bf9ae600783 (patch) | |
tree | e15c6dba283ecb98908652a47cb9eec1da6f2791 /src | |
parent | 123271c223d9e038b848cbbdaec79a92cf5d13ba (diff) | |
download | dsub-b77174762ee353d42eeda155299b5bf9ae600783.tar.gz dsub-b77174762ee353d42eeda155299b5bf9ae600783.tar.bz2 dsub-b77174762ee353d42eeda155299b5bf9ae600783.zip |
Don't generate unique id unless necessary
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index b5e0f22b..092d63ce 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -48,7 +48,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter private static final String TAG = SelectDirectoryFragment.class.getSimpleName();
private DragSortListView entryList;
- int rootId;
+ int rootId = -1;
private View emptyView;
private boolean hideButtons = false;
private Boolean licenseValid;
@@ -72,7 +72,6 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter public SelectDirectoryFragment() {
super();
- rootId = getNewId();
}
@Override
@@ -86,6 +85,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter entries = (List<MusicDirectory.Entry>) bundle.getSerializable(Constants.FRAGMENT_LIST);
restoredInstance = true;
}
+ if(rootId == -1) {
+ rootId = getNewId();
+ }
}
@Override
|