Skip to content

Commit

Permalink
Add note about hasDirectSubscribers
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Apr 23, 2024
1 parent c30ece2 commit d016e26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Nuke/Tasks/TaskLoadImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ final class TaskLoadImage: ImagePipelineTask<ImageResponse> {
}
}

/// Returns `true` if the task has at least one image task that was directly
/// subscribed to it, which means that the request was initiated by the
/// user and not the framework.
private var hasDirectSubscribers: Bool {
subscribers.contains { $0 is ImageTask }
}
Expand Down

0 comments on commit d016e26

Please sign in to comment.