Skip to content

Commit a0ec299

Browse files
committed
[BOOK-151] feat: 이전 도서 검색 API 연동 작업시 누락된 coil 이미지 캐싱 관련 설정 추가
1 parent 2bd183d commit a0ec299

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

app/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ dependencies {
4949

5050
projects.feature.home,
5151
projects.feature.library,
52-
projects.feature.main,
5352
projects.feature.login,
53+
projects.feature.main,
54+
projects.feature.screens,
5455
projects.feature.search,
5556
projects.feature.settings,
5657

5758
libs.androidx.activity.compose,
5859
libs.androidx.startup,
59-
libs.logger,
60+
libs.coil.compose,
6061
libs.kakao.auth,
62+
libs.logger,
6163

6264
libs.bundles.circuit,
6365
)
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
package com.ninecraft.booket
22

33
import android.app.Application
4+
import coil.ImageLoader
5+
import coil.ImageLoaderFactory
6+
import coil.disk.DiskCache
7+
import coil.util.DebugLogger
48
import dagger.hilt.android.HiltAndroidApp
59

610
@HiltAndroidApp
7-
class BooketApplication : Application()
11+
class BooketApplication : Application() , ImageLoaderFactory {
12+
override fun newImageLoader(): ImageLoader {
13+
return ImageLoader.Builder(this)
14+
.diskCache {
15+
DiskCache.Builder()
16+
.directory(cacheDir.resolve("image_cache"))
17+
.maxSizeBytes(10 * 1024 * 1024)
18+
.build()
19+
}
20+
.logger(DebugLogger())
21+
.respectCacheHeaders(false)
22+
.build()
23+
}
24+
}

0 commit comments

Comments
 (0)