Skip to content

Commit

Permalink
Merge pull request #241 from mash-up-kr/chore/home_tap
Browse files Browse the repository at this point in the history
�홈 탭바 디자인 변경
  • Loading branch information
fbghgus123 authored Sep 30, 2024
2 parents cc75fa4 + b44e111 commit 611cb50
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 35 deletions.
3 changes: 0 additions & 3 deletions feature/home/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ dependencies {
// Image
implementation(libs.coil)

// Blur
implementation(libs.haze)

// Paging
implementation(libs.paging.runtime)
implementation(libs.paging.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -81,8 +77,6 @@ fun HomeScreen(
Box(
modifier = modifier.fillMaxSize(),
) {
val hazeState = remember { HazeState() }

if (state.isLoading) {
Box(
modifier = Modifier
Expand Down Expand Up @@ -141,9 +135,7 @@ fun HomeScreen(
}
} else {
DoraInfinityLazyColumn(
modifier = Modifier
.fillMaxSize()
.haze(hazeState),
modifier = Modifier.fillMaxSize(),
scrollState = scrollState,
isLoadAvailable = state.isScrollLoading.not(),
onReachedBottom = onReachedBottom,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -467,15 +457,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 = "테스트",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -171,25 +170,17 @@ class HomeViewModel @Inject constructor(
intent {
reduce {
state.copy(
tapElements = folderList.mapIndexed { index, folder ->
tapElements = folderList.map { folder ->
DoraChipUiModel(
id = folder.id.orEmpty(),
title = folder.name,
icon = setDefaultFolderIcon(index),
)
},
)
}
}
}

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,
Expand Down
4 changes: 0 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" }
Expand Down

0 comments on commit 611cb50

Please sign in to comment.