Commit 79b3e0c6 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

cherry pick 6de07962

parent 33170389
Pipeline #20901 passed with stage
in 2 minutes and 25 seconds
......@@ -24,8 +24,8 @@ public class FileFilterFactory {
case "Applications":
filter = new AppSettingsFileFilter();
break;
case "Images":
filter = new ImagesFileFilter();
case "media":
filter = new MediaFileFilter();
break;
default:
filter = new NoCacheFileFilter();
......
......@@ -13,9 +13,11 @@ import java.io.FileFilter;
/**
* @author Vincent Bourgmayer
*/
class ImagesFileFilter implements FileFilter {
class MediaFileFilter implements FileFilter {
@Override
public boolean accept(File file) {
return !file.isDirectory() || !file.getName().equals( ".thumbnails" );
//Return true if it's not a hidden file
return !file.isHidden();
}
}
......@@ -543,7 +543,7 @@ public class ObserverService extends Service implements OnRemoteOperationListene
folderIdList.add( (long) syncedFolder.getId() );
}
final FileFilter filter = FileFilterFactory.getFileFilter( syncedFolder.getLibelle() );
final FileFilter filter = FileFilterFactory.getFileFilter( (syncedFolder.isMediaType()) ? "media" : syncedFolder.getLibelle() );
File[] subElements = folder.listFiles(filter);
Log.v(TAG, "loop through subfiles");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment