[Android] AudioBrowserList: code simplification
Jean-Baptiste Kempf
git at videolan.org
Sat May 23 19:09:13 CEST 2015
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 23 18:56:17 2015 +0200| [748333d1afc4d9c80cdcfd08c8e6f45d30523e6f] | committer: Jean-Baptiste Kempf
AudioBrowserList: code simplification
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=748333d1afc4d9c80cdcfd08c8e6f45d30523e6f
---
.../org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index bcac1e7..7d1ad2e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -562,12 +562,8 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
if (mItems.get(position).mIsSeparator)
throw new IllegalArgumentException("Tested item must be a media item and not a separator.");
- if (position == mItems.size() - 1)
- return true; //consider end of list as a separator. Nicer to display
- else if (mItems.get(position + 1).mIsSeparator )
- return true;
- else
- return false;
+ //consider end of list as a separator. Nicer to display
+ return (position == mItems.size() - 1 || mItems.get(position + 1).mIsSeparator);
}
public interface ContextPopupMenuListener {
More information about the Android
mailing list