Skip to content

Commit

Permalink
Merge pull request #38 from Toongether/feature/#33
Browse files Browse the repository at this point in the history
이미지 로딩 라이브러리 Glide를 Coil로 변경
  • Loading branch information
SeokgyuYun authored Sep 6, 2023
2 parents 8a11cee + fa4d417 commit da415ef
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 18 deletions.
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

0 comments on commit da415ef

Please sign in to comment.