Fix hidden flag

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2023-11-16 15:32:19 +01:00
parent 8ae13ea4a4
commit 4cf339e57c
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
3 changed files with 2 additions and 6 deletions

View file

@ -920,7 +920,6 @@ public class FileDataStorageManager {
ocFile.setDownloading(nullToZero(fileEntity.isDownloading()) == 1);
ocFile.setEtagInConflict(fileEntity.getEtagInConflict());
ocFile.setFavorite(nullToZero(fileEntity.getFavorite()) == 1);
ocFile.setHidden(nullToZero(fileEntity.getHidden()) == 1);
ocFile.setEncrypted(nullToZero(fileEntity.isEncrypted()) == 1);
// if (ocFile.isEncrypted()) {
// ocFile.setFileName(cursor.getString(cursor.getColumnIndexOrThrow(ProviderTableMeta.FILE_NAME)));
@ -946,6 +945,7 @@ public class FileDataStorageManager {
ocFile.setLockTimeout(nullToZero(fileEntity.getLockTimeout()));
ocFile.setLockToken(fileEntity.getLockToken());
ocFile.setLivePhoto(fileEntity.getMetadataLivePhoto());
ocFile.setHidden(nullToZero(fileEntity.getHidden()) == 1);
String sharees = fileEntity.getSharees();
// Surprisingly JSON deserialization causes significant overhead.

View file

@ -692,10 +692,6 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
if (mStorageManager != null) {
mFiles = mStorageManager.getFolderContent(directory, onlyOnDevice);
mFiles.forEach(file -> {
Log_OC.d("","IS LIVE PHOTO FILE:" + file.getLivePhoto());
Log_OC.d("","IS HIDDEN FILE:" + file.getHidden());
});
if (!preferences.isShowHiddenFilesEnabled()) {
mFiles = filterHiddenFiles(mFiles);
}

View file

@ -238,7 +238,6 @@ public final class FileStorageUtils {
file.setRemoteId(remote.getRemoteId());
file.setLocalId(remote.getLocalId());
file.setFavorite(remote.isFavorite());
file.setHidden(remote.getHidden());
if (file.isFolder()) {
file.setEncrypted(remote.isEncrypted());
}
@ -262,6 +261,7 @@ public final class FileStorageUtils {
file.setImageDimension(remote.getImageDimension());
file.setGeoLocation(remote.getGeoLocation());
file.setLivePhoto(remote.getLivePhoto());
file.setHidden(remote.getHidden());
return file;
}