This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 149
[New arch] Download a single file #386
Merged
abelgardep
merged 6 commits into
new_arch/synchronization
from
new_arch/download_with_worker
Apr 30, 2021
Merged
[New arch] Download a single file #386
abelgardep
merged 6 commits into
new_arch/synchronization
from
new_arch/download_with_worker
Apr 30, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davigonz
suggested changes
Apr 21, 2021
...ibrary/src/main/java/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.kt
Outdated
Show resolved
Hide resolved
...ibrary/src/main/java/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.kt
Outdated
Show resolved
Hide resolved
Comment on lines
+128
to
+134
if (modificationTime != null) { | ||
val modificationDate = WebdavUtils.parseResponseDate(modificationTime) | ||
modificationTimestamp = modificationDate?.time ?: 0 | ||
} else { | ||
Timber.e("Could not read modification time from response downloading %s", remotePath) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
if (modificationTime != null) { | |
val modificationDate = WebdavUtils.parseResponseDate(modificationTime) | |
modificationTimestamp = modificationDate?.time ?: 0 | |
} else { | |
Timber.e("Could not read modification time from response downloading %s", remotePath) | |
} | |
modificationTime?.let { | |
val modificationDate = WebdavUtils.parseResponseDate(modificationTime) | |
modificationTimestamp = modificationDate?.time ?: 0 | |
} ?: Timber.e("Could not read modification time from response downloading %s", remotePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lastly, I prefer the if else
clause instead of the let ?:
one. It is easier to follow from my point of view.
9d11296
to
94e2195
Compare
9440bd3
to
49af9ac
Compare
davigonz
approved these changes
Apr 29, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements owncloud/android#2872
Needed for owncloud/android#3169