-
Notifications
You must be signed in to change notification settings - Fork 0
[Hotfix/#9] : 온보딩 UI / 프로필 수정 오류 해결 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -74,7 +78,8 @@ fun OnboardingScreen( | |
| Column( | ||
| modifier = Modifier | ||
| .fillMaxSize() | ||
| .background(NoostakTheme.colors.white), | ||
| .background(NoostakTheme.colors.white) | ||
| .verticalScroll(rememberScrollState()), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: LazyColumn 안쓴 나머지 페이지들은 다 verticalScroll 넣어줘야되나.... 근데 그런 페이지 없겠쥬?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: 에뮬레이터로 확인할때 딱히 문제있는 페이지는 없었슴다ㅏㅏ |
||
| horizontalAlignment = Alignment.CenterHorizontally, | ||
| verticalArrangement = Arrangement.Top | ||
| ) { | ||
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: contentScale은 뭐고 wrapContentWidth는 뭐에여.. 진짜 컴포즈 1도 모르겠다 xiang
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 : 엄마 그렇게 말하면 어떠케여 |
||
| ) | ||
| Text( | ||
| modifier = Modifier.padding(top = 30.dp), | ||
|
|
@@ -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 = | ||
|
|
@@ -127,6 +137,7 @@ fun OnboardingScreen( | |
| ) | ||
| } | ||
| } | ||
| Spacer(modifier = Modifier.weight(1f)) | ||
|
|
||
| val isLastPage = pagerState.currentPage == pages.size - 1 | ||
| val buttonText = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 : 하암.. 슬퍼 로그아웃하고 새로 로그인하면 로컬 데이터가 초기화되는건가? 만약 초기화되는 문제라면 저장 프로세스 추가해서 데이터 안 덮어씌워도 되려나?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 새로 설치 및 캐시 데이터 삭제 후 기존 아이디로 로그인하면 데이터를 못 불러와서 빈값으로 적용되드라구.. |
||
| } | ||
| validateMemberName(memberName) | ||
| } | ||
|
|
||
| private suspend fun saveProfile(memberName: String, memberProfileImage: String?) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3 : 화면 안넘어가는게 UI 문제였던건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: 온보딩 이미지 크기 때문에 밑에가 잘리는 문제가 있었습니다!