Repository navigation
[FIX] 2차 QA 임차민 - 3 #229
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
The head ref may contain hidden characters: "FLT-35-2-\uCC28-qa-\uC784\uCC28\uBBFC-3"
[FIX] 2차 QA 임차민 - 3 #229
Changes from all commits
88abc66
298a3f8
c9d6a88
a490601
527fe5d
8db3dbf
5f3aa85
13931c7
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 |
|---|---|---|
|
|
@@ -2,12 +2,12 @@ package com.flint.android.presentation.login | |
|
|
||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.BoxWithConstraints | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.offset | ||
| import androidx.compose.foundation.layout.navigationBarsPadding | ||
| import androidx.compose.foundation.layout.absoluteOffset | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.width | ||
| import androidx.compose.runtime.Composable | ||
|
|
@@ -31,11 +31,12 @@ import com.flint.android.domain.type.ProviderType | |
| import com.flint.android.presentation.login.component.KakaoLoginButton | ||
| import com.flint.android.presentation.login.event.LoginNavigationEvent | ||
| import com.flint.android.presentation.login.data.VerifyStatusData | ||
| import com.flint.android.presentation.splash.SplashLogoMetrics | ||
| import timber.log.Timber | ||
| import kotlin.math.max | ||
|
|
||
| @Composable | ||
| fun LoginRoute( | ||
| paddingValues: PaddingValues, | ||
| navigateToOnBoarding: (tempToken: String) -> Unit, | ||
| navigateToHome: () -> Unit, | ||
| viewModel: LoginViewModel = hiltViewModel(), | ||
|
|
@@ -61,6 +62,8 @@ fun LoginRoute( | |
| } | ||
| } | ||
|
|
||
| // Splash -> Login 전환 시 로고 위치가 그대로 이어지도록, Splash와 동일하게 | ||
| // 화면 전체(엣지투엣지)를 기준으로 배치 | ||
| LoginScreen( | ||
| onKakaoLoginClick = { | ||
| kakaoLoginManager.login(context) { result -> | ||
|
|
@@ -76,7 +79,6 @@ fun LoginRoute( | |
| } | ||
| } | ||
| }, | ||
| modifier = Modifier.padding(paddingValues) | ||
| ) | ||
|
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.
유일한 사용처였던 엣지투엣지가 의도라면 |
||
| } | ||
|
|
||
|
|
@@ -85,7 +87,7 @@ fun LoginScreen( | |
| onKakaoLoginClick: () -> Unit, | ||
| modifier: Modifier = Modifier | ||
| ) { | ||
| Box( | ||
| BoxWithConstraints( | ||
| modifier = | ||
| modifier | ||
| .fillMaxSize() | ||
|
|
@@ -99,22 +101,35 @@ fun LoginScreen( | |
| spread = 0.dp, | ||
| ), | ||
| ) { | ||
| // 스플래시-> 1440x3120 캔버스를 ContentScale.Crop + 중앙 정렬로 그림 | ||
| // 같은 계산을 그대로 재현해서 로고의 크기와 위치를 맞추면, 기기 화면 크기와 무관하게 | ||
| // 스플래시가 끝난 그 자리에 로그인 화면의 로고가 정확히 겹침 | ||
| val splashScale = max( | ||
| maxWidth.value / SplashLogoMetrics.CANVAS_WIDTH, | ||
| maxHeight.value / SplashLogoMetrics.CANVAS_HEIGHT, | ||
| ) | ||
| val splashCanvasLeft = (maxWidth.value - SplashLogoMetrics.CANVAS_WIDTH * splashScale) / 2f | ||
| val splashCanvasTop = (maxHeight.value - SplashLogoMetrics.CANVAS_HEIGHT * splashScale) / 2f | ||
|
|
||
| Image( | ||
| painter = painterResource(R.drawable.img_flint_title), | ||
| contentDescription = null, | ||
| modifier = | ||
| Modifier | ||
| .align(Alignment.Center) | ||
| .width(160.dp) | ||
| .height(56.dp) | ||
| .offset(y = (-32).dp), | ||
| .absoluteOffset( | ||
| x = (splashCanvasLeft + SplashLogoMetrics.LOGO_LEFT * splashScale).dp, | ||
| y = (splashCanvasTop + SplashLogoMetrics.LOGO_TOP * splashScale).dp, | ||
| ) | ||
| .width((SplashLogoMetrics.LOGO_WIDTH * splashScale).dp) | ||
| .height((SplashLogoMetrics.LOGO_HEIGHT * splashScale).dp), | ||
| ) | ||
|
|
||
| KakaoLoginButton( | ||
| modifier = | ||
| Modifier | ||
| .fillMaxWidth() | ||
| .align(Alignment.BottomCenter) | ||
| .navigationBarsPadding() | ||
| .padding(bottom = 60.dp) | ||
| .padding(horizontal = 20.dp), | ||
| onClick = { | ||
|
|
@@ -124,6 +139,7 @@ fun LoginScreen( | |
| } | ||
| } | ||
|
|
||
|
|
||
| @Preview | ||
| @Composable | ||
| private fun PreviewLoginScreen() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -200,19 +200,23 @@ class OnboardingViewModel | |
|
|
||
| // ---------- onboarding content ---------- | ||
| fun updateSearchKeyword(keyword: String) { | ||
| val previousKeyword = _contentUiState.value.searchKeyword | ||
| _contentUiState.update { currentState -> | ||
| currentState.copy(searchKeyword = keyword) | ||
| } | ||
|
|
||
| if (keyword.isEmpty() && previousKeyword.isNotEmpty()) { | ||
|
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. X 버튼 한 번에 검색 요청이 두 번 나갑니다.
// FlintSearchTextField.kt:57-60
if (value.isNotEmpty()) {
onValueChanged("") // -> updateSearchKeyword("")
onClearAction() // -> clearSearchKeyword()
}이번에
|
||
| val genres = _contentUiState.value.selectedGenres | ||
| getSearchContentList(keyword = null, genres = genres) | ||
|
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.
fun clearSearchKeyword() {
_contentUiState.update { it.copy(searchKeyword = "") }
val genres = _contentUiState.value.selectedGenres
getSearchContentList(keyword = null, genres = genres)
}새로 추가된 분기가 하는 일과 정확히 같습니다. 둘 중 하나만 남기고(예: |
||
| } | ||
| } | ||
|
|
||
| fun loadInitialContents() { | ||
| getSearchContentList(keyword = null, genres = emptySet()) | ||
| } | ||
|
|
||
| fun clearSearchKeyword() { | ||
| _contentUiState.update { it.copy(searchKeyword = "") } | ||
| val genres = _contentUiState.value.selectedGenres | ||
| getSearchContentList(keyword = null, genres = genres) | ||
| updateSearchKeyword("") | ||
| } | ||
|
|
||
| fun searchContents() { | ||
|
|
||
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.
draw9Patch(90번 줄)가 이제 사용처 없는 죽은 코드가 되었습니다.git grep draw9Patch결과 선언 하나만 남았습니다 — 유일한 호출부였던ProfileKeywordChip이glassTagBackground로 교체되었습니다.함께
app/src/main/res/drawable/의 9-patch 6개도 참조가 사라져 APK에만 남습니다:bg_tag_blue.9.png,bg_tag_gray.9.png,bg_tag_green.9.png,bg_tag_orange.9.png,bg_tag_pink.9.png,bg_tag_yellow.9.pngisMinifyEnabled = false이고 리소스 축소도 꺼져 있어 자동 정리되지 않습니다. 이번 PR에서draw9Patch와 9-patch 리소스를 같이 삭제해 주세요.