Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fun DeleteRoundButton(

@Preview(showBackground = true)
@Composable
fun DeleteRoundButtonPreview() {
private fun DeleteRoundButtonPreview() {
TerningPointTheme {
DeleteRoundButton(
style = TextStyle(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fun FilteringButton(

@Preview(showBackground = true)
@Composable
fun FilteringButtonPreview() {
private fun FilteringButtonPreview() {
TerningPointTheme {
Column {
FilteringButton(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,24 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.R
import com.terning.core.designsystem.extension.noRippleClickable
import com.terning.core.designsystem.theme.TerningPointTheme
import com.terning.core.designsystem.type.ProfileImage

@Composable
fun ProfileWithPlusButton(
profileImage: String,
onClick: (Boolean) -> Unit,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 컴포넌트를 사용하는 곳들에서 람다 파라미터로 주어지는 Boolean 값을 사용하지 않는 것 같던데 확인 한번 부탁드려요~
사용되지 않는 파라미터는 없애는게 좋을 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

예리하시군요!! 저도 코드를 안 본지 오래돼서... ㅎㅎ 불린 값을 사용 안 하고 있을 거라 생각하고 찾아봤는데, 여기서 true로 넘겨준 값을 각 스크린의 뷰모델로 넘겨서 바텀시트의 가시 여부를 결정하고 있더라구요! 그래서 이대로 둬도 괜찮을 것 같아요:)
확인 감사합니당👍

modifier: Modifier = Modifier,
) {
val userProfile = ProfileImage.fromString(profileImage)

Box(
modifier = modifier.wrapContentWidth()
modifier = modifier
.wrapContentWidth()
.noRippleClickable {
onClick(true)
}
) {
Image(
painterResource(id = userProfile.drawableResId),
Expand All @@ -44,6 +51,11 @@ fun ProfileWithPlusButton(

@Preview(showBackground = true)
@Composable
fun ProfileWithPlusButtonPreview() {
ProfileWithPlusButton(profileImage = "basic")
private fun ProfileWithPlusButtonPreview() {
TerningPointTheme {
ProfileWithPlusButton(
profileImage = "basic",
onClick = {}
)
}
}
1 change: 0 additions & 1 deletion core/network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,4 @@ dependencies {
implementation(libs.process.phoenix)
implementation(libs.bundles.retrofit)
implementation(libs.bundles.okhttp)
implementation(platform(libs.okhttp.bom))
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.terning.feature.filtering.R
import com.terning.feature.filtering.filteringone.component.StatusOneRadioGroup

@Composable
fun FilteringOneRoute(
internal fun FilteringOneRoute(
name: String,
onNextClick: (String) -> Unit,
navigateUp: () -> Unit,
Expand Down Expand Up @@ -73,7 +73,7 @@ fun FilteringOneRoute(
}

@Composable
fun FilteringOneScreen(
private fun FilteringOneScreen(
name: String,
onNextClick: (String) -> Unit,
navigateUp: () -> Unit,
Expand Down Expand Up @@ -153,7 +153,7 @@ fun FilteringOneScreen(

@Preview(showBackground = true)
@Composable
fun FilteringOneScreenPreview() {
private fun FilteringOneScreenPreview() {
TerningPointTheme {
FilteringOneScreen(
name = "터닝이",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.terning.core.designsystem.type.Grade
import com.terning.feature.filtering.R

@Composable
fun StatusOneRadioGroup(
internal fun StatusOneRadioGroup(
onButtonClick: (String) -> Unit,
modifier: Modifier = Modifier,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import com.terning.feature.filtering.filteringthree.component.FilteringYearMonth
import java.util.Calendar

@Composable
fun FilteringThreeRoute(
internal fun FilteringThreeRoute(
grade: String,
workingPeriod: String,
navigateUp: () -> Unit,
Expand Down Expand Up @@ -101,7 +101,7 @@ fun FilteringThreeRoute(
}

@Composable
fun FilteringThreeScreen(
private fun FilteringThreeScreen(
navigateUp: () -> Unit,
chosenYear: Int,
chosenMonth: Int,
Expand Down Expand Up @@ -167,7 +167,7 @@ fun FilteringThreeScreen(

@Preview(showBackground = true)
@Composable
fun FilteringThreeScreenPreview() {
private fun FilteringThreeScreenPreview() {
TerningPointTheme {
FilteringThreeScreen(
navigateUp = { },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ import com.terning.core.designsystem.util.CalendarDefaults.END_MONTH
import com.terning.core.designsystem.util.CalendarDefaults.END_YEAR
import com.terning.core.designsystem.util.CalendarDefaults.START_MONTH
import com.terning.core.designsystem.util.CalendarDefaults.START_YEAR
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import okhttp3.internal.toImmutableList

private val years =
(START_YEAR..END_YEAR).map { "${it}년" }.toImmutableList()
Expand Down Expand Up @@ -107,7 +108,7 @@ fun FilteringYearMonthPicker(

@Composable
fun DatePicker(
items: List<String>,
items: ImmutableList<String>,
modifier: Modifier = Modifier,
pickerState: PickerState = rememberPickerState(),
startIndex: Int = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.terning.feature.filtering.R
import com.terning.feature.filtering.filteringtwo.component.StatusTwoRadioGroup

@Composable
fun FilteringTwoRoute(
internal fun FilteringTwoRoute(
grade: String,
onNextClick: (String, String) -> Unit,
navigateUp: () -> Unit,
Expand Down Expand Up @@ -76,7 +76,7 @@ fun FilteringTwoRoute(
}

@Composable
fun FilteringTwoScreen(
private fun FilteringTwoScreen(
grade: String,
onNextClick: (String, String) -> Unit,
navigateUp: () -> Unit,
Expand Down Expand Up @@ -142,7 +142,7 @@ fun FilteringTwoScreen(

@Preview(showBackground = true)
@Composable
fun FilteringTwoScreenPreview() {
private fun FilteringTwoScreenPreview() {
TerningPointTheme {
FilteringTwoScreen(
grade = "freshman",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.terning.core.designsystem.type.WorkingPeriod
import com.terning.feature.filtering.R

@Composable
fun StatusTwoRadioGroup(
internal fun StatusTwoRadioGroup(
onButtonClick: (String) -> Unit,
modifier: Modifier = Modifier,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import com.terning.feature.filtering.R
import kotlinx.coroutines.delay

@Composable
fun StartFilteringRoute(
internal fun StartFilteringRoute(
onStartClick: () -> Unit,
onLaterClick: () -> Unit,
viewModel: StartFilteringViewModel = hiltViewModel()
Expand Down Expand Up @@ -78,7 +78,7 @@ fun StartFilteringRoute(
}

@Composable
fun StartFilteringScreen(
private fun StartFilteringScreen(
onStartClick: () -> Unit,
onLaterClick: () -> Unit,
buttonState: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import com.terning.feature.filtering.R
import kotlinx.coroutines.delay

@Composable
fun StartHomeRoute(
internal fun StartHomeRoute(
navigateToHome: () -> Unit,
viewModel: StartHomeViewModel = hiltViewModel()
) {
Expand All @@ -57,7 +57,7 @@ fun StartHomeRoute(
}

@Composable
fun StartHomeScreen(
private fun StartHomeScreen(
onClick: () -> Unit,
buttonState: Boolean,
screenHeight: Float,
Expand Down
16 changes: 9 additions & 7 deletions feature/home/src/main/java/com/terning/feature/home/HomeRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.Manifest
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand All @@ -27,8 +28,11 @@ import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.LocalLifecycleOwner
Expand All @@ -45,7 +49,6 @@ import com.terning.core.analytics.EventType
import com.terning.core.analytics.LocalTracker
import com.terning.core.designsystem.R.raw.paging_loading_animation
import com.terning.core.designsystem.component.bottomsheet.SortingBottomSheet
import com.terning.core.designsystem.component.image.TerningImage
import com.terning.core.designsystem.component.item.InternItemWithShadow
import com.terning.core.designsystem.component.item.TerningLottieAnimation
import com.terning.core.designsystem.extension.noRippleClickable
Expand Down Expand Up @@ -104,8 +107,7 @@ fun HomeRoute(
viewModel.updateAlarmAvailability(isGranted)
viewModel.updatePermissionRequested(true)
}
}
else {
} else {
val isAlarmAvailable = viewModel.getAlarmAvailability()
viewModel.updateAlarmAvailability(isAlarmAvailable)
}
Expand Down Expand Up @@ -289,10 +291,10 @@ fun HomeScreen(
.background(White)
.padding(paddingValues)
) {
TerningImage(
painter = R.drawable.ic_terning_logo_typo,
modifier = Modifier
.padding(start = 24.dp, top = 16.dp, bottom = 16.dp)
Image(
imageVector = ImageVector.vectorResource(R.drawable.ic_terning_logo_typo),
modifier = Modifier.padding(start = 24.dp, top = 16.dp, bottom = 16.dp),
contentDescription = "home logo"
)

LazyColumn(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.terning.feature.home.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand All @@ -11,10 +12,12 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.component.image.TerningImage
import com.terning.core.designsystem.extension.customShadow
import com.terning.core.designsystem.theme.Grey150
import com.terning.core.designsystem.theme.Grey500
Expand Down Expand Up @@ -42,11 +45,12 @@ fun HomeUpcomingEmptyFilter(
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
TerningImage(
painter = R.drawable.ic_home_scrap_empty,
Image(
imageVector = ImageVector.vectorResource(R.drawable.ic_home_scrap_empty),
modifier = Modifier
.padding(top = 23.dp)
.size(44.dp)
.size(44.dp),
contentDescription = "scrap empty"
)
Text(
text = stringResource(id = R.string.home_upcoming_no_scrap),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.terning.feature.intern.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand All @@ -13,9 +14,9 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.component.image.TerningImage
import com.terning.core.designsystem.theme.Black
import com.terning.core.designsystem.theme.Grey100
import com.terning.core.designsystem.theme.Grey300
Expand Down Expand Up @@ -78,8 +79,9 @@ fun InternTitle(
modifier = Modifier
.fillMaxWidth()
) {
TerningImage(
painter = R.drawable.ic_view_count_14
Image(
painter = painterResource(R.drawable.ic_view_count_14),
contentDescription = "view count"
)
Text(
text = stringResource(id = R.string.intern_view_count_detail, viewCount),
Expand Down
Loading