From c257904dba4e96eac86c9b3dbb601e798ec205cc Mon Sep 17 00:00:00 2001 From: fbghgus123 Date: Sun, 29 Sep 2024 13:43:53 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[chore]=20=ED=99=88=20=ED=83=AD=EB=B0=94=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/designsystem/component/chips/FeedUiModel.kt | 2 +- .../com/mashup/dorabangs/feature/home/HomeScreen.kt | 3 --- .../mashup/dorabangs/feature/home/HomeViewModel.kt | 11 +---------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/core/designsystem/src/main/java/com/mashup/dorabangs/core/designsystem/component/chips/FeedUiModel.kt b/core/designsystem/src/main/java/com/mashup/dorabangs/core/designsystem/component/chips/FeedUiModel.kt index cebc5e33..5e91b2df 100644 --- a/core/designsystem/src/main/java/com/mashup/dorabangs/core/designsystem/component/chips/FeedUiModel.kt +++ b/core/designsystem/src/main/java/com/mashup/dorabangs/core/designsystem/component/chips/FeedUiModel.kt @@ -61,7 +61,7 @@ sealed interface FeedUiModel { val title: String = "", val postCount: Int = 0, val folderId: String = "", - @DrawableRes val icon: Int? = CR.drawable.ic_3d_all_small, + @DrawableRes val icon: Int? = null, ) : FeedUiModel { override val uuid: String = UUID.randomUUID().toString() diff --git a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt index e0e61614..b4f584b9 100644 --- a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt +++ b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt @@ -467,15 +467,12 @@ fun HomeScreenPreview() { tapElements = listOf( FeedUiModel.DoraChipUiModel( title = "전체", - icon = R.drawable.ic_plus, ), FeedUiModel.DoraChipUiModel( title = "즐겨찾기", - icon = R.drawable.ic_plus, ), FeedUiModel.DoraChipUiModel( title = "나중에 읽을 링크", - icon = R.drawable.ic_plus, ), FeedUiModel.DoraChipUiModel( title = "테스트", diff --git a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt index ca860132..390110fe 100644 --- a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt +++ b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt @@ -4,7 +4,6 @@ import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.mashup.dorabangs.core.coroutine.doraLaunch -import com.mashup.dorabangs.core.designsystem.R import com.mashup.dorabangs.core.designsystem.component.chips.FeedUiModel.DoraChipUiModel import com.mashup.dorabangs.core.designsystem.component.chips.FeedUiModel.FeedCardUiModel import com.mashup.dorabangs.core.designsystem.component.toast.ToastStyle @@ -171,11 +170,10 @@ class HomeViewModel @Inject constructor( intent { reduce { state.copy( - tapElements = folderList.mapIndexed { index, folder -> + tapElements = folderList.mapIndexed { _, folder -> DoraChipUiModel( id = folder.id.orEmpty(), title = folder.name, - icon = setDefaultFolderIcon(index), ) }, ) @@ -183,13 +181,6 @@ class HomeViewModel @Inject constructor( } } - private fun setDefaultFolderIcon(index: Int) = when (index) { - 0 -> R.drawable.ic_3d_all_small - 1 -> R.drawable.ic_3d_bookmark_small - 2 -> R.drawable.ic_3d_pin_small - else -> null - } - private fun setTextHelperEnable( isEnable: Boolean, helperMsg: String, From 147ece818590c1dfeb1721ade1636cd6dc6c6e44 Mon Sep 17 00:00:00 2001 From: fbghgus123 Date: Sun, 29 Sep 2024 14:00:47 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[chore]=20=ED=99=88=20=ED=83=AD=EB=B0=94=20?= =?UTF-8?q?=EB=B8=94=EB=9F=AC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature/home/build.gradle.kts | 3 --- .../dorabangs/feature/home/HomeScreen.kt | 20 +++++-------------- gradle/libs.versions.toml | 4 ---- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/feature/home/build.gradle.kts b/feature/home/build.gradle.kts index a554b615..9f09de5c 100644 --- a/feature/home/build.gradle.kts +++ b/feature/home/build.gradle.kts @@ -70,9 +70,6 @@ dependencies { // Image implementation(libs.coil) - // Blur - implementation(libs.haze) - // Paging implementation(libs.paging.runtime) implementation(libs.paging.compose) diff --git a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt index b4f584b9..bc918f5c 100644 --- a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt +++ b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt @@ -57,10 +57,6 @@ import com.mashup.dorabangs.core.designsystem.theme.DoraColorTokens import com.mashup.dorabangs.core.designsystem.theme.DoraGradientToken import com.mashup.dorabangs.core.designsystem.theme.DoraRoundTokens import com.mashup.dorabangs.core.designsystem.theme.DoraTypoTokens -import dev.chrisbanes.haze.HazeState -import dev.chrisbanes.haze.HazeStyle -import dev.chrisbanes.haze.haze -import dev.chrisbanes.haze.hazeChild @Composable fun HomeScreen( @@ -81,8 +77,6 @@ fun HomeScreen( Box( modifier = modifier.fillMaxSize(), ) { - val hazeState = remember { HazeState() } - if (state.isLoading) { Box( modifier = Modifier @@ -141,9 +135,7 @@ fun HomeScreen( } } else { DoraInfinityLazyColumn( - modifier = Modifier - .fillMaxSize() - .haze(hazeState), + modifier = Modifier.fillMaxSize(), scrollState = scrollState, isLoadAvailable = state.isScrollLoading.not(), onReachedBottom = onReachedBottom, @@ -208,15 +200,13 @@ fun HomeScreen( Box( modifier = Modifier .fillMaxWidth() - .height(101.dp) - .hazeChild( - state = hazeState, - style = HazeStyle(blurRadius = 12.dp), - ), + .height(101.dp), ) } - Column { + Column( + modifier = Modifier.background(DoraColorTokens.White) + ) { DoraTopBar.HomeTopBar( modifier = Modifier .height(48.dp) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c0a2641d..c6c82bba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -40,7 +40,6 @@ datastore = "1.1.1" jsoup = "1.14.3" gms = "4.4.2" firebase-bom = "33.1.1" -haze = "0.7.2" lottie = "6.4.1" paging = "3.3.0" paging-common = "3.1.1" @@ -112,9 +111,6 @@ coil = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" } #html jsoup = { group = "org.jsoup", name = "jsoup", version.ref = "jsoup" } -#blur -haze = { group = "dev.chrisbanes.haze", name = "haze", version.ref = "haze" } - #firebase firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" } firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics-ktx" } From 9e89c635982bc7fde8ac84abc1bde89915b79740 Mon Sep 17 00:00:00 2001 From: fbghgus123 Date: Sun, 29 Sep 2024 14:03:44 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[chore]=20spotless=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt index bc918f5c..15aad26f 100644 --- a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt +++ b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeScreen.kt @@ -205,7 +205,7 @@ fun HomeScreen( } Column( - modifier = Modifier.background(DoraColorTokens.White) + modifier = Modifier.background(DoraColorTokens.White), ) { DoraTopBar.HomeTopBar( modifier = Modifier From 38d348ef2187b5b0e51253b339a7e664d2b6e485 Mon Sep 17 00:00:00 2001 From: fbghgus123 Date: Mon, 30 Sep 2024 21:07:33 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[chore]=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mashup/dorabangs/feature/home/HomeViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt index 390110fe..79674ab8 100644 --- a/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt +++ b/feature/home/src/main/java/com/mashup/dorabangs/feature/home/HomeViewModel.kt @@ -170,7 +170,7 @@ class HomeViewModel @Inject constructor( intent { reduce { state.copy( - tapElements = folderList.mapIndexed { _, folder -> + tapElements = folderList.map { folder -> DoraChipUiModel( id = folder.id.orEmpty(), title = folder.name,