Skip to content

Commit 5092ec4

Browse files
committed
Apply pageNum directly onto object property
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
1 parent 0ae485b commit 5092ec4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ public class Enumerator: NSObject, NSFileProviderEnumerator {
221221

222222
Task {
223223
var providedPage: NSFileProviderPage? = nil // Used for pagination token sent to server
224-
var pageNum = pageNum // If we are paginating a new target server URL, reset to 0
225224
// Do not pass in the NSFileProviderPage default pages, these are not valid Nextcloud
226225
// pagination tokens
227226
if page != NSFileProviderPage.initialPageSortedByName as NSFileProviderPage &&
@@ -239,7 +238,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator {
239238
"Setting enumerator server URL to \(self.serverUrl, privacy: .public)"
240239
)
241240
serverUrl = pageString
242-
pageNum = 0
241+
pageNum = 0 // If paginating new target server URL reset to 0
243242
} else {
244243
providedPage = page
245244
}

0 commit comments

Comments
 (0)