Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

이미지 로딩 라이브러리 Glide를 Coil로 변경 #38

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dependencies {
implementation(project(":core:model"))
implementation(project(":core:common"))

implementation(libs.glide.compose)
implementation(libs.kotlinx.datetime)
implementation(libs.androidx.paging.compose)
implementation(libs.coil.compose)
Expand Down
8 changes: 3 additions & 5 deletions core/ui/src/main/java/kr/toongether/ui/SeriesCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.times
import androidx.core.graphics.toColorInt
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
import com.bumptech.glide.integration.compose.GlideImage
import coil.compose.AsyncImage
import kr.toongether.designsystem.theme.Shape

@OptIn(ExperimentalGlideComposeApi::class)
@Composable
fun SeriesCard(
modifier: Modifier = Modifier,
Expand All @@ -43,7 +41,7 @@ fun SeriesCard(
.padding(4.dp)
.clip(Shape.medium)
) {
GlideImage(
AsyncImage(
modifier = modifier
.fillMaxWidth()
.onGloballyPositioned {
Expand Down Expand Up @@ -79,7 +77,7 @@ fun SeriesCard(
.height(63.dp)
.align(Alignment.BottomCenter)
) {
GlideImage(
AsyncImage(
modifier = modifier
.width(titleWidth.dp)
.align(Alignment.Center),
Expand Down
8 changes: 3 additions & 5 deletions core/ui/src/main/java/kr/toongether/ui/ShortsCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
import com.bumptech.glide.integration.compose.GlideImage
import coil.compose.AsyncImage
import kotlinx.datetime.LocalDateTime
import kr.toongether.common.toRelativeDateTime
import kr.toongether.designsystem.theme.Gray
import kr.toongether.designsystem.theme.pretendard

@OptIn(ExperimentalGlideComposeApi::class)
@Composable
fun ShortsCard(
profileImage: String?,
Expand Down Expand Up @@ -57,7 +55,7 @@ fun ShortsCard(
contentDescription = null
)
} else {
GlideImage(
AsyncImage(
modifier = modifier.size(35.dp),
model = profileImage,
contentDescription = null
Expand Down Expand Up @@ -98,7 +96,7 @@ fun ShortsCard(

Spacer(modifier = modifier.height(8.dp))

GlideImage(
AsyncImage(
modifier = modifier.fillMaxWidth(),
model = thumbnail,
contentDescription = null,
Expand Down
2 changes: 1 addition & 1 deletion feature/comic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ android {
}

dependencies {
implementation(libs.glide.compose)
implementation(libs.coil.compose)
implementation(libs.kotlinx.datetime)
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavController
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
import com.bumptech.glide.integration.compose.GlideImage
import coil.compose.AsyncImage
import kr.toongether.designsystem.component.ToongetherScrollbar
import kr.toongether.designsystem.component.ToongetherTopAppBar
import kr.toongether.designsystem.icon.ToongetherIcons
Expand Down Expand Up @@ -207,7 +206,6 @@ internal fun ComicScreen(
}
}

@OptIn(ExperimentalGlideComposeApi::class)
@Composable
private fun ComicItem(
modifier: Modifier = Modifier,
Expand All @@ -220,7 +218,7 @@ private fun ComicItem(
.defaultMinSize(minHeight = height)
.background(Color.Black)
) {
GlideImage(
AsyncImage(
modifier = modifier
.fillMaxWidth(),
model = imageUrl,
Expand Down
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ androidxEspresso = "3.5.1"
androidxTestExt = "1.1.5"
androidxTestRules = "1.5.0"
androidxTestRunner = "1.5.2"
glide = "1.0.0-alpha.1"
hilt = "2.44.2"
hiltExt = "1.0.0"
junit4 = "4.13.2"
Expand Down Expand Up @@ -68,7 +67,6 @@ androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espres
androidx-test-ext = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "androidxTestExt" }
androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidxTestRules" }
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTestRunner" }
glide-compose = { group = "com.github.bumptech.glide", name = "compose", version.ref = "glide" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hilt" }
hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" }
Expand Down