Skip to content

Fix #3383 #3434

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6249,8 +6249,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/nextcloud/NextcloudKit";
requirement = {
kind = exactVersion;
version = 6.0.6;
branch = develop;
kind = branch;
};
};
F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {
Expand Down
8 changes: 8 additions & 0 deletions iOSClient/Share/NCShareNetworking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ class NCShareNetworking: NSObject {
/// Remove the download limit on the share, if existent.
///
func removeShareDownloadLimit(token: String) {
guard NCCapabilities.shared.getCapabilities(account: metadata.account).capabilityFileSharingDownloadLimit else {
return
}

NCActivityIndicator.shared.start(backgroundView: view)

NextcloudKit.shared.removeShareDownloadLimit(account: metadata.account, token: token) { error in
Expand All @@ -210,6 +214,10 @@ class NCShareNetworking: NSObject {
/// - Parameter limit: The new download limit to set.
///
func setShareDownloadLimit(_ limit: Int, token: String) {
guard NCCapabilities.shared.getCapabilities(account: metadata.account).capabilityFileSharingDownloadLimit else {
return
}

NCActivityIndicator.shared.start(backgroundView: view)

NextcloudKit.shared.setShareDownloadLimit(account: metadata.account, token: token, limit: limit) { error in
Expand Down
Loading