Skip to content

Commit

Permalink
Enable debug logs for Coil (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
boswelja authored Feb 8, 2025
1 parent 3358288 commit 96e44af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion app/src/main/kotlin/com/imashnake/animite/AnimiteApplication.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
package com.imashnake.animite

import android.app.Application
import coil3.ImageLoader
import coil3.PlatformContext
import coil3.SingletonImageLoader
import coil3.util.DebugLogger
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class AnimiteApplication: Application()
class AnimiteApplication: Application(), SingletonImageLoader.Factory {
override fun newImageLoader(context: PlatformContext): ImageLoader {
return ImageLoader.Builder(this)
.logger(DebugLogger())
.build()
}
}
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ compose = [

coil = [
"coil-compose",
"coil-network"
"coil-network",
"ktor-engine-android"
]

ktor = [
Expand Down

0 comments on commit 96e44af

Please sign in to comment.