diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-09-09 16:09:51 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-09-09 16:09:51 -0700 |
commit | fb563d329d67c5f1179e2919207da16814ef3037 (patch) | |
tree | 88f17363dbb4514f2818dd367acec4541d4c8a0c /src/github | |
parent | 37ef7b929395ade8c078f9ecbe4ca193ee30e079 (diff) | |
download | dsub-fb563d329d67c5f1179e2919207da16814ef3037.tar.gz dsub-fb563d329d67c5f1179e2919207da16814ef3037.tar.bz2 dsub-fb563d329d67c5f1179e2919207da16814ef3037.zip |
Added a generic sort method that takes care of conditional logic
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/domain/MusicDirectory.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/domain/MusicDirectory.java b/src/github/daneren2005/dsub/domain/MusicDirectory.java index edcbe77d..4983c1ec 100644 --- a/src/github/daneren2005/dsub/domain/MusicDirectory.java +++ b/src/github/daneren2005/dsub/domain/MusicDirectory.java @@ -102,6 +102,11 @@ public class MusicDirectory implements Serializable { return children.size(); } + public void sortChildren(Context context, int instance) { + if(ServerInfo.checkServerVersion(context, "1.8", instance)) { + sortChildren(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_CUSTOM_SORT_ENABLED, true)); + } + } public void sortChildren(boolean byYear) { EntryComparator.sort(children, byYear); } |