Skip to content

Commit

Permalink
Minor tidying, doc clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
pcantrell committed Feb 24, 2018
1 parent 1da50cb commit 9261272
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Source/Siesta/Resource/Resource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public final class Resource: NSObject

trackRequest(req, in: &loadRequests)

req.onProgress(notifyObservers)
req.onProgress(notifyObservers(ofProgress:))

req.onNewData(receiveNewDataFromNetwork)
req.onNotModified(receiveDataNotModified)
Expand Down Expand Up @@ -624,8 +624,9 @@ public final class Resource: NSObject
- Sets `latestData` to nil.
- Sets `latestError` to nil.
- Cancels all resource requests in progress.
- Triggers a cache fetch if there is a persistent cache configured for this resource.
Observers receive a `newData` event. Requests in progress call completion hooks with a cancellation error.
Observers receive a `newData(.wipe)` event. Requests in progress call completion hooks with a cancellation error.
- SeeAlso: `invalidate()`
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/Siesta/Resource/ResourceObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public extension Resource
}
}

internal func notifyObservers(progress: Double)
internal func notifyObservers(ofProgress progress: Double)
{
for entry in observers.values
{
Expand Down

0 comments on commit 9261272

Please sign in to comment.