Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

[New arch] Download a single file #386

Merged
merged 6 commits into from
Apr 30, 2021

Conversation

abelgardep
Copy link
Contributor

@abelgardep abelgardep commented Mar 24, 2021

@abelgardep abelgardep self-assigned this Mar 24, 2021
@abelgardep abelgardep marked this pull request as ready for review April 16, 2021 12:20
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)
}
Copy link
Contributor

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)

Copy link
Contributor Author

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.

@abelgardep abelgardep force-pushed the new_arch/synchronization branch from 9d11296 to 94e2195 Compare April 28, 2021 12:27
@abelgardep abelgardep force-pushed the new_arch/download_with_worker branch from 9440bd3 to 49af9ac Compare April 28, 2021 15:13
@abelgardep abelgardep merged commit e1099b3 into new_arch/synchronization Apr 30, 2021
@delete-merged-branch delete-merged-branch bot deleted the new_arch/download_with_worker branch April 30, 2021 11:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants