This repository was archived by the owner on Mar 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
filepicker/src/main/java/com/jaiselrahman/filepicker/loader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Step 2: Add the dependency
3838``` gradle
3939 dependencies {
4040 ...
41- implementation 'com.github.jaiselrahman:FilePicker:1.2.0 '
41+ implementation 'com.github.jaiselrahman:FilePicker:1.2.2 '
4242 }
4343```
4444
Original file line number Diff line number Diff line change @@ -93,18 +93,17 @@ public class FileLoader extends CursorLoader {
9393
9494 selectionBuilder .append ("(" );
9595
96- boolean hasMime = ( rootPath == null ) ? ! selectionArgs .isEmpty () : selectionArgs .size () > 1 ;
97- if (hasMime ) {
96+ int mimeSize = rootPath == null ? selectionArgs .size () : selectionArgs .size () - 1 ;
97+ if (mimeSize > 0 ) {
9898 selectionBuilder .append (MIME_TYPE ).append (" = ?" );
99- int size = selectionArgs .size ();
100- for (int i = 1 ; i < size ; i ++) {
99+ for (int i = 1 ; i < mimeSize ; i ++) {
101100 selectionBuilder .append (" or " ).append (MIME_TYPE ).append (" = ?" );
102101 }
103102 }
104103
105104 String [] suffixes = configs .getSuffixes ();
106105 if (configs .isShowFiles () && suffixes != null && suffixes .length > 0 ) {
107- if (hasMime ) {
106+ if (mimeSize > 0 ) {
108107 selectionBuilder .append (" or " );
109108 }
110109 selectionBuilder .append (DATA ).append (" LIKE ?" );
You can’t perform that action at this time.
0 commit comments