Skip to content

Commit f556648

Browse files
committed
add missing function
Signed-off-by: alperozturk <[email protected]>
1 parent 00c19ab commit f556648

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,19 @@ public OCFile findDuplicatedFile(OCFile parentFolder, ServerFileInterface newFil
249249
return duplicatedFile;
250250
}
251251

252+
public String getFileNameBasedOnEncryptionStatus(OCFile file) {
253+
FileEntity entity = fileDao.getFileById(file.getFileId());
254+
if (entity == null) {
255+
return file.getFileName();
256+
}
257+
258+
if (file.isEncrypted()) {
259+
return entity.getEncryptedName();
260+
} else {
261+
return entity.getName();
262+
}
263+
}
264+
252265
public List<OCFile> getFolderImages(OCFile folder, boolean onlyOnDevice) {
253266
List<OCFile> imageList = new ArrayList<>();
254267

0 commit comments

Comments
 (0)