Skip to content

Conversation

@mpivchev
Copy link
Collaborator

@mpivchev mpivchev commented Dec 1, 2025

Before download limit would always update when a share changes, resetting the download counter. Now it resets only when changed by user.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the download limit update logic by adding a flag to track whether the download limit was explicitly changed by the user. This prevents unnecessary API calls to update the download limit when the user saves share settings without modifying the download limit.

Key changes:

  • Added a changeDownloadLimit parameter to the updateShare method to conditionally update download limits
  • Introduced a downloadLimitChanged flag in NCShareAdvancePermission to track user modifications
  • Modified the conditional logic to only update download limits when explicitly changed

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
iOSClient/Share/NCShareNetworking.swift Added changeDownloadLimit parameter to updateShare method and updated conditional logic to check this flag before updating download limits
iOSClient/Share/Advanced/NCShareAdvancePermission.swift Added downloadLimitChanged flag and set it to true in the delegate method when user changes download limit

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mpivchev mpivchev merged commit 821c1ba into master Dec 1, 2025
10 of 11 checks passed
@mpivchev mpivchev deleted the download-limit-flag branch December 1, 2025 14:31
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.

3 participants