-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fixes for downloading #23
Conversation
I'm not sure whether this is related to this, but downloaded videos are not deleting. |
@saeedbashir Do you see it in this branch only? Could you please provide some details to reproduce this. Thank you |
I was playing around with the downloads and it happened. Now, I'm not able to replicate that issue but I am facing another issue, the downloads continue even after canceling the download. Screen.Recording.2024-07-18.at.8.17.16.AM.mov |
@@ -268,7 +268,8 @@ public class DownloadManager: DownloadManagerProtocol { | |||
public func deleteFile(blocks: [CourseBlock]) async { | |||
for block in blocks { | |||
do { | |||
if let fileURL = fileUrl(for: block.id) { | |||
if let fileURL = fileUrl(for: block.id), |
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.
Getting Trailing Whitespace Violation:
warning here.
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.
fixed
@saeedbashir Yes we are facing this bug too - it's not just cancelling issue it's how downloads start. @forgotvas is looking on this. We will create ticket/issue and perhaps separate branch/PR will be better for this. Thank you |
If that is the case, we can merge this PR. Please create a issue for this so it wont lost and we have to fix it before MVP. |
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.
Approving this as per the discussion 👍
Sergey made these tickets: |
* Merge pull request #23 from edx/small-fix-for-downloading-cancelling fix: fixes for downloading * chore: fix for Xcode 16 and after merge * Merge pull request #24 from edx/2U/fix/download-states fix: [iOS] On Course "Home" tab the row height * fix: after merge, deleted IAP part fix: [iOS] On Course "Home" tab the row height * Merge pull request #25 from edx/2U/feat/primary-horizontal feat: Landscape mode Improvement * fix: removed IAP part * chore: remove snack bar error for course dates info API on course home (#27) * Merge pull request #28 from shafqat-muneer/Shafqat/LEARNER-10020-ErrorHandling feat: Course Level Error Handling for Empty States * chore: remove IAP part after merging --------- Co-authored-by: Anton Yarmolenko <[email protected]> Co-authored-by: Saeed Bashir <[email protected]>
This PR fixes next issues:
openedx#485
openedx#458
To fix the remaining tmp files, DownloadRequest.Destination was added with the setting .removePreviousFile.
The way we cancel downloads at the chapter level has also been changed: since we have no individual control at this level, we must cancel and remove all files in the chapter to prevent a situation where we cancel a download but the files remain.