Skip to content

Commit

Permalink
Docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Mar 18, 2020
1 parent 5022aff commit fd8348a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions coil-base/src/main/java/coil/EventListener.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import coil.transform.Transformation

/**
* An [ImageLoader]-scoped listener for tracking the progress of an image request.
* This class is useful for analytics, performance, or other metrics tracking.
* This class is useful for measuring analytics, performance, or other metrics tracking.
*
* @see ImageLoaderBuilder.eventListenerFactory
* @see ImageLoaderBuilder.eventListener
*/
@ExperimentalCoilApi
interface EventListener : Request.Listener {
Expand Down
4 changes: 2 additions & 2 deletions coil-base/src/main/java/coil/ImageLoaderBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ class ImageLoaderBuilder(context: Context) {
* Set a single [EventListener] that will receive all callbacks for requests launched by this image loader.
*/
@ExperimentalCoilApi
fun eventListener(listener: EventListener) = eventListenerFactory(EventListener.Factory(listener))
fun eventListener(listener: EventListener) = eventListener(EventListener.Factory(listener))

/**
* Set the [EventListener.Factory] to create per-request [EventListener]s.
*
* @see eventListener
*/
@ExperimentalCoilApi
fun eventListenerFactory(factory: EventListener.Factory) = apply {
fun eventListener(factory: EventListener.Factory) = apply {
this.eventListenerFactory = factory
}

Expand Down

0 comments on commit fd8348a

Please sign in to comment.