mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 06:35:48 +03:00
dont let setInternalFolderSyncTimestamp via null value, dont return nullable value
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
edb2a4a4d3
commit
90be7e66b1
2 changed files with 6 additions and 2 deletions
|
@ -1125,7 +1125,7 @@ public class FileDataStorageManager {
|
|||
ocFile.setLivePhoto(fileEntity.getMetadataLivePhoto());
|
||||
ocFile.setHidden(nullToZero(fileEntity.getHidden()) == 1);
|
||||
ocFile.setE2eCounter(fileEntity.getE2eCounter());
|
||||
ocFile.setInternalFolderSyncTimestamp(fileEntity.getInternalTwoWaySync());
|
||||
ocFile.setInternalFolderSyncTimestamp(nullToZero(fileEntity.getInternalTwoWaySync()));
|
||||
|
||||
String sharees = fileEntity.getSharees();
|
||||
// Surprisingly JSON deserialization causes significant overhead.
|
||||
|
|
|
@ -1076,11 +1076,15 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
|
|||
}
|
||||
|
||||
public boolean isInternalFolderSync() {
|
||||
if (internalFolderSyncTimestamp == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return internalFolderSyncTimestamp >= 0;
|
||||
}
|
||||
|
||||
public Long getInternalFolderSyncTimestamp() {
|
||||
return internalFolderSyncTimestamp;
|
||||
return Objects.requireNonNullElse(internalFolderSyncTimestamp, -1L);
|
||||
}
|
||||
|
||||
public void setInternalFolderSyncTimestamp(Long internalFolderSyncTimestamp) {
|
||||
|
|
Loading…
Reference in a new issue