@@ -144,7 +144,7 @@ class NCShareNetworking: NSObject {
144144 self . database. addShare ( account: self . metadata. account, home: home, shares: [ share] )
145145
146146 if shareable. hasChanges ( comparedTo: share) {
147- self . updateShare ( shareable, downloadLimit: downloadLimit)
147+ self . updateShare ( shareable, downloadLimit: downloadLimit, changeDownloadLimit : true )
148148 // Download limit update should happen implicitly on share update.
149149 } else {
150150 if case let . limited( limit, _) = downloadLimit,
@@ -195,7 +195,7 @@ class NCShareNetworking: NSObject {
195195 }
196196 }
197197
198- func updateShare( _ shareable: Shareable , downloadLimit: DownloadLimitViewModel ) {
198+ func updateShare( _ shareable: Shareable , downloadLimit: DownloadLimitViewModel , changeDownloadLimit : Bool = false ) {
199199 NCActivityIndicator . shared. start ( backgroundView: view)
200200 NextcloudKit . shared. updateShare ( idShare: shareable. idShare, password: shareable. password, expireDate: shareable. formattedDateString, permissions: shareable. permissions, note: shareable. note, label: shareable. label, hideDownload: shareable. hideDownload, attributes: shareable. attributes, account: metadata. account) { task in
201201 Task {
@@ -216,7 +216,8 @@ class NCShareNetworking: NSObject {
216216
217217 if capabilities. fileSharingDownloadLimit,
218218 shareable. shareType == NKShare . ShareType. publicLink. rawValue,
219- shareable. itemType == NCShareCommon . itemTypeFile {
219+ shareable. itemType == NCShareCommon . itemTypeFile,
220+ changeDownloadLimit {
220221 if case let . limited( limit, _) = downloadLimit {
221222 self . setShareDownloadLimit ( limit, token: share. token)
222223 } else {
0 commit comments