diff options
author | daneren2005 <daneren2005@gmail.com> | 2014-06-18 14:56:16 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2014-06-18 14:56:16 -0700 |
commit | 837c6dd07f0cb2ac9b01603969637fed464ae29a (patch) | |
tree | 8e45459d7d34f5b59d9f2c6b263f17a686393a07 | |
parent | 01ab305fabf7936d44b0f6af8de6ecb4c670cb20 (diff) | |
download | dsub-837c6dd07f0cb2ac9b01603969637fed464ae29a.tar.gz dsub-837c6dd07f0cb2ac9b01603969637fed464ae29a.tar.bz2 dsub-837c6dd07f0cb2ac9b01603969637fed464ae29a.zip |
#363 Remove update/delete playlist options when not owner
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java index 0bf64be1..4b0fc6fe 100644 --- a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java @@ -52,6 +52,13 @@ public class SelectPlaylistFragment extends SelectListFragment<Playlist> { } else {
menu.removeItem(R.id.playlist_menu_stop_sync);
}
+
+ if(!Util.checkServerVersion(context, "1.8")) {
+ menu.removeItem(R.id.playlist_update_info);
+ } else if(playlist.getPublic() != null && playlist.getPublic() == true && !UserUtil.getCurrentUsername(context).equals(playlist.getOwner())) {
+ menu.removeItem(R.id.playlist_update_info);
+ menu.removeItem(R.id.playlist_menu_delete);
+ }
}
recreateContextMenu(menu);
|