Skip to content
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 Cancel ongoing uploading operations after user forcibly cancels the post #2768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scoder1747
Copy link
Contributor

@scoder1747 scoder1747 commented Dec 14, 2024

Summary

Issue- #2766

Bug scenario- When user presses the Cancel post, all the uploading operations should stop right there but currently the uploading task continues in the background with success urls.

Replication:
Add 5 photos from MediaPicker View and press 'Upload'. Then, immediately Cancel the post. Uploading task continues.

This PR introduces-
1] Cancel ongoing uploading operations after the user has pressed Cancel post
2] Don't Generate Hepatic Feedback in this error case because user has already dismissed the PostView.

Testing Performed after the changes made:

1] Add 5 photos from media pickers and press 'Upload'. Then, immediately Cancel the post. No uploading Process takes place [Passed]
2] No UINotificationFeedbackGenerator() is triggered [Passed]

(This change is difficult to demonstrate
on a simulator so there’s no attachment.)

Checklist

  • I have read (or I am familiar with) the Contribution Guidelines
  • I have tested the changes in this PR
  • My PR is either small, or I have split it into smaller logical commits that are easier to review
  • I have added the signoff line to all my commits. See Signing off your work
  • I have added appropriate changelog entries for the changes in this PR. See Adding changelog entries
    • I do not need to add a changelog entry. Reason: [Please provide a reason]
  • I have added appropriate Closes: or Fixes: tags in the commit messages wherever applicable, or made sure those are not needed. See Submitting patches

Test report

Please provide a test report for the changes in this PR. You can use the template below, but feel free to modify it as needed.

Device: [Please specify the device you used for testing]

iOS: [Please specify the iOS version you used for testing]

Damus: [Please specify the Damus version or commit hash you used for testing]

Setup: [Please provide a brief description of the setup you used for testing, if applicable]

Steps: [Please provide a list of steps you took to test the changes in this PR]

Results:

  • PASS
  • Partial PASS
    • Details: [Please provide details of the partial pass]

Other notes

[Please provide any other information that you think is relevant to this PR.]

1] Cancel ongoing uploading operations after the user has pressed Cancel post
2] Don't Generate Hepatic Feedback in this error case because user has already dismissed the Post View
Changelog-Fixed: Cancel ongoing uploading operations after user press Cancel post button
Signed-off-by: Swift Coder <[email protected]>
@scoder1747 scoder1747 changed the title Cancel ongoing uploading operations after user forcibly cancels the post Fix Cancel ongoing uploading operations after user forcibly cancels the post Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant