Update fields

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2023-11-16 11:22:30 +01:00
parent 20c6fbb94d
commit 3538e8b485
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
4 changed files with 12 additions and 6 deletions

View file

@ -78,10 +78,13 @@ data class FileEntity(
val isDownloading: Int?,
@ColumnInfo(name = ProviderTableMeta.FILE_FAVORITE)
val favorite: Int?,
@ColumnInfo(name = ProviderTableMeta.FILE_IS_ENCRYPTED)
val hidden: Int?,
@ColumnInfo(name = ProviderTableMeta.FILE_HIDDEN)
val hidden: Int?,
@ColumnInfo(name = ProviderTableMeta.FILE_IS_ENCRYPTED)
val isEncrypted: Int?,
@ColumnInfo(name = ProviderTableMeta.FILE_ETAG_IN_CONFLICT)
val etagInConflict: String?,
@ColumnInfo(name = ProviderTableMeta.FILE_SHARED_WITH_SHAREE)

View file

@ -254,6 +254,7 @@ public class SynchronizeFileOperation extends SyncOperation {
} else {
// TODO CHECK: is this really useful in some point in the code?
mServerFile.setFavorite(mLocalFile.isFavorite());
mServerFile.setHidden(mLocalFile.getHidden());
mServerFile.setLastSyncDateForData(mLocalFile.getLastSyncDateForData());
mServerFile.setStoragePath(mLocalFile.getStoragePath());
mServerFile.setParentId(mLocalFile.getParentId());

View file

@ -692,7 +692,11 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
if (mStorageManager != null) {
mFiles = mStorageManager.getFolderContent(directory, onlyOnDevice);
mFiles.forEach(file -> {
if (file.getHidden()) {
Log_OC.d("","FOUND HIDDEN FILE!");
}
});
if (!preferences.isShowHiddenFilesEnabled()) {
mFiles = filterHiddenFiles(mFiles);
}
@ -701,9 +705,6 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
sortOrder = preferences.getSortOrderByFolder(directory);
mFiles = sortOrder.sortCloudFiles(mFiles);
mFiles.forEach(file -> {
Log_OC.d("","isHidden:" + file.getHidden());
});
mergeOCFilesForLivePhoto();
mFilesAll.clear();
mFilesAll.addAll(mFiles);

View file

@ -238,6 +238,7 @@ 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());
}