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
Copy link
Member

Choose a reason for hiding this comment

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

P3 : 화면 안넘어가는게 UI 문제였던건가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

P3: 온보딩 이미지 크기 때문에 밑에가 잘리는 문제가 있었습니다!

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
Expand Down Expand Up @@ -74,7 +78,8 @@ fun OnboardingScreen(
Column(
modifier = Modifier
.fillMaxSize()
.background(NoostakTheme.colors.white),
.background(NoostakTheme.colors.white)
.verticalScroll(rememberScrollState()),
Copy link
Contributor

Choose a reason for hiding this comment

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

P3: LazyColumn 안쓴 나머지 페이지들은 다 verticalScroll 넣어줘야되나.... 근데 그런 페이지 없겠쥬?

Copy link
Contributor Author

@youjin09222 youjin09222 May 23, 2025

Choose a reason for hiding this comment

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

P3: 에뮬레이터로 확인할때 딱히 문제있는 페이지는 없었슴다ㅏㅏ

horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Top
) {
Expand All @@ -87,10 +92,13 @@ fun OnboardingScreen(
verticalArrangement = Arrangement.Top
) {
Image(
modifier = Modifier.fillMaxWidth(),
imageVector = ImageVector.vectorResource(id = pages[page].imageRes),
contentDescription = null,
contentScale = ContentScale.FillWidth
contentScale = ContentScale.FillWidth,
modifier = Modifier
.fillMaxWidth()
.background(NoostakTheme.colors.gray100)
.wrapContentWidth(Alignment.CenterHorizontally)
Comment on lines +97 to +101
Copy link
Contributor

Choose a reason for hiding this comment

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

P3: contentScale은 뭐고 wrapContentWidth는 뭐에여.. 진짜 컴포즈 1도 모르겠다 xiang

Copy link
Member

Choose a reason for hiding this comment

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

P3 : 엄마 그렇게 말하면 어떠케여

)
Text(
modifier = Modifier.padding(top = 30.dp),
Expand All @@ -113,7 +121,9 @@ fun OnboardingScreen(
}
}
Row(
Modifier.weight(1f)
modifier = Modifier.fillMaxWidth()
.padding(bottom = 26.dp),
horizontalArrangement = Arrangement.Center
) {
repeat(pagerState.pageCount) { iteration ->
val color =
Expand All @@ -127,6 +137,7 @@ fun OnboardingScreen(
)
}
}
Spacer(modifier = Modifier.weight(1f))

val isLastPage = pagerState.currentPage == pages.size - 1
val buttonText =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fun EditProfileRoute(
var isInitialized by remember { mutableStateOf(false) }

LaunchedEffect(Unit) {
editProfileViewModel.initProfile()
editProfileViewModel.setInitialProfile(nickname, profileImage)
isInitialized = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.sopt.domain.repository.UserInfoRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import javax.inject.Inject
Expand All @@ -34,16 +33,16 @@ class EditProfileViewModel @Inject constructor(
private val _showErrorDialog = MutableStateFlow(false)
val showErrorDialog: StateFlow<Boolean> get() = _showErrorDialog

suspend fun initProfile() {
userInfoRepository.getNickname().first().also {
_nickname.value = it
onMemberNameChanged(it)
}

userInfoRepository.getProfileImage().first().also {
_profileImage.value = it
onImageSelected(it)
fun setInitialProfile(memberName: String, memberProfileImage: String?) {
_nickname.value = memberName
_profileImage.value = memberProfileImage ?: ""
_userProfileState.update {
it.copy(
memberName = memberName,
memberProfileImage = memberProfileImage
)
Comment on lines +37 to +43
Copy link
Member

Choose a reason for hiding this comment

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

P2 : 하암.. 슬퍼 로그아웃하고 새로 로그인하면 로컬 데이터가 초기화되는건가? 만약 초기화되는 문제라면 저장 프로세스 추가해서 데이터 안 덮어씌워도 되려나?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

새로 설치 및 캐시 데이터 삭제 후 기존 아이디로 로그인하면 데이터를 못 불러와서 빈값으로 적용되드라구..
마이페이지에서 전달하는 매개변수로 초기화하게 바꿨슈

}
validateMemberName(memberName)
}

private suspend fun saveProfile(memberName: String, memberProfileImage: String?) {
Expand Down