-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 최근 로그인 계정 정보 안내 기능 구현 #243
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
base: develop
Are you sure you want to change the base?
Conversation
기존 CustomTooltipBox -> RecordTooltipBox로 네이밍 변경
개요사용자의 마지막 로그인 계정(카카오 또는 구글) 정보를 저장하고 추적하는 기능을 추가했습니다. DataStore를 통해 로그인 방법을 지속적으로 관리하며, 로그인 화면에 최근 로그인 방법을 알려주는 툴팁을 표시합니다. 변경사항
예상 코드 리뷰 난이도🎯 3 (중간) | ⏱️ ~25분 시
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 3
🧹 Nitpick comments (6)
core/datastore/api/src/main/kotlin/com/ninecraft/booket/core/datastore/api/datasource/LoginMethodDataSource.kt (1)
6-10: 공개 API에 KDoc 문서화 권장새로운 공개 인터페이스에 KDoc 주석을 추가하면 API 사용성과 유지보수성이 향상됩니다. 각 메서드의 목적과 동작을 간략히 설명하는 것이 좋습니다.
🔎 제안하는 문서화 예시
+/** + * 최근 로그인 방식을 관리하는 데이터 소스. + */ interface LoginMethodDataSource { + /** + * 최근 로그인 방식을 Flow로 제공합니다. + */ val recentLoginMethod: Flow<LoginMethod> + + /** + * 최근 로그인 방식을 저장합니다. + */ suspend fun setRecentLoginMethod(loginMethod: LoginMethod) + + /** + * 저장된 최근 로그인 방식을 초기화합니다. + */ suspend fun clearRecentLoginMethod() }core/model/src/main/kotlin/com/ninecraft/booket/core/model/LoginMethod.kt (1)
3-7: Enum 정의 확인 완료 및 문서화 권장로그인 방식을 나타내는 enum이 명확하게 정의되었습니다. PR 설명에 따르면 구글 로그인 툴팁은 별도 PR에서 작업 예정이므로
간단한 KDoc 주석을 추가하면 코드 가독성이 향상됩니다.
🔎 제안하는 문서화 예시
+/** + * 사용자의 로그인 방식을 나타냅니다. + */ enum class LoginMethod { + /** 로그인 방식이 설정되지 않음 */ NONE, + /** 카카오 로그인 */ KAKAO, + /** 구글 로그인 */ GOOGLE, }core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt (1)
21-25: 공개 API에 KDoc 문서화 권장새로운 공개 API에 KDoc 주석을 추가하면 의도와 사용 방법이 명확해집니다. 특히
clearRecentLoginMethod()가 어떤 상황에서 호출되어야 하는지(로그아웃/탈퇴 시) 명시하면 좋습니다.🔎 제안하는 문서화 예시
+ /** + * 최근 로그인 방식을 나타내는 Flow입니다. + */ val recentLoginMethod: Flow<LoginMethod> + /** + * 최근 로그인 방식을 저장합니다. + * @param loginMethod 저장할 로그인 방식 + */ suspend fun setRecentLoginMethod(loginMethod: LoginMethod) + /** + * 저장된 최근 로그인 방식을 초기화합니다. + * 로그아웃 또는 회원 탈퇴 시 호출됩니다. + */ suspend fun clearRecentLoginMethod()core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultLoginMethodDataSource.kt (1)
22-31: 문자열 비교 대신LoginMethod.name을 사용하는 것이 더 안전합니다.현재 하드코딩된 문자열("KAKAO", "GOOGLE")로 비교하고 있는데,
LoginMethodenum의name을 사용하면 enum 이름 변경 시에도 일관성을 유지할 수 있습니다.🔎 제안하는 수정
override val recentLoginMethod: Flow<LoginMethod> = dataStore.data .handleIOException() .map { prefs -> val method = prefs[RECENT_LOGIN_METHOD] when (method) { - "KAKAO" -> LoginMethod.KAKAO - "GOOGLE" -> LoginMethod.GOOGLE + LoginMethod.KAKAO.name -> LoginMethod.KAKAO + LoginMethod.GOOGLE.name -> LoginMethod.GOOGLE else -> LoginMethod.NONE } }feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/component/LoginTooltipBox.kt (1)
77-82: 삼각형 포인터의 오프셋 값에 하드코딩된14.dp가 사용되고 있습니다.다른 곳에서는
ReedTheme.spacing을 사용하는데, 여기서는14.dp가 하드코딩되어 있습니다. 일관성을 위해 테마 값을 사용하거나 상수로 추출하는 것을 고려해 주세요.feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUi.kt (1)
128-135: 툴팁 위치 지정에 하드코딩된 오프셋 값이 사용되고 있습니다.
(-28).dp와(-32).dp값이 하드코딩되어 있습니다. 다양한 화면 크기나 폰트 스케일링에서 일관된 위치를 보장하려면 테마 기반 값을 사용하거나, 최소한 상수로 추출하는 것이 좋습니다.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.ktcore/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultAuthRepository.ktcore/datastore/api/src/main/kotlin/com/ninecraft/booket/core/datastore/api/datasource/LoginMethodDataSource.ktcore/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultLoginMethodDataSource.ktcore/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/di/DataStoreGraph.ktcore/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/di/DataStoreQualifier.ktcore/model/src/main/kotlin/com/ninecraft/booket/core/model/LoginMethod.ktfeature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginPresenter.ktfeature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUi.ktfeature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUiState.ktfeature/login/src/main/kotlin/com/ninecraft/booket/feature/login/component/LoginTooltipBox.ktfeature/login/src/main/res/values/strings.xmlfeature/onboarding/stability/onboarding.stabilityfeature/record/src/main/kotlin/com/ninecraft/booket/feature/record/component/RecordTooltipBox.ktfeature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/ImpressionStep.ktfeature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/QuoteStep.kt
💤 Files with no reviewable changes (1)
- feature/onboarding/stability/onboarding.stability
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-28T12:25:54.058Z
Learnt from: easyhooon
Repo: YAPP-Github/Reed-Android PR: 174
File: feature/search/src/main/kotlin/com/ninecraft/booket/feature/search/book/BookSearchPresenter.kt:128-133
Timestamp: 2025-08-28T12:25:54.058Z
Learning: In BookSearchPresenter.kt, when a guest user tries to register a book and is redirected to login, the bottom sheet (isBookRegisterBottomSheetVisible) and selection state (selectedBookIsbn, selectedBookStatus) are intentionally kept open/preserved so that when the user returns from login, they can continue from where they left off without losing context.
Applied to files:
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUiState.ktcore/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/di/DataStoreGraph.ktcore/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.ktfeature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginPresenter.ktfeature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUi.kt
📚 Learning: 2025-07-31T23:30:37.547Z
Learnt from: easyhooon
Repo: YAPP-Github/Reed-Android PR: 88
File: feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/record/RecordDetailPresenter.kt:18-47
Timestamp: 2025-07-31T23:30:37.547Z
Learning: In Circuit architecture, presenters receive the Screen object directly as a constructor parameter (e.g., Assisted private val screen: RecordDetailScreen), and screen parameters are accessed through this screen object (e.g., screen.recordId). Screen parameters should not be added as separate constructor parameters.
Applied to files:
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUiState.kt
📚 Learning: 2025-08-28T12:26:12.482Z
Learnt from: easyhooon
Repo: YAPP-Github/Reed-Android PR: 174
File: core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt:16-19
Timestamp: 2025-08-28T12:26:12.482Z
Learning: In AuthRepository, autoLoginState and userState serve different purposes and should not be conflated:
- autoLoginState: tracks whether automatic login is enabled (user preference/setting)
- userState: tracks current authentication state (Guest vs LoggedIn)
These are orthogonal concepts that need to be maintained separately.
Applied to files:
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt
📚 Learning: 2025-07-20T12:34:23.786Z
Learnt from: easyhooon
Repo: YAPP-Github/Reed-Android PR: 61
File: feature/webview/build.gradle.kts:17-21
Timestamp: 2025-07-20T12:34:23.786Z
Learning: Reed-Android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 plugin은 Circuit, Compose, 그리고 core 모듈들의 의존성을 자동으로 포함하므로, 각 feature 모듈의 build.gradle.kts에서는 특별한 의존성(예: libs.logger, libs.kakao.auth)만 별도로 선언하면 된다.
Applied to files:
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUi.kt
🧬 Code graph analysis (6)
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/ImpressionStep.kt (1)
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/component/RecordTooltipBox.kt (1)
RecordTooltipBox(25-64)
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/QuoteStep.kt (1)
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/component/RecordTooltipBox.kt (1)
RecordTooltipBox(25-64)
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUi.kt (5)
core/ui/src/main/kotlin/com/ninecraft/booket/core/ui/component/ReedTopAppBar.kt (1)
ReedCloseTopAppBar(105-120)core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ReedButton.kt (1)
ReedButton(34-114)feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/component/LoginTooltipBox.kt (1)
LoginTooltipBox(51-91)core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ReedTextButton.kt (1)
ReedTextButton(25-74)core/ui/src/main/kotlin/com/ninecraft/booket/core/ui/component/ReedLoadingIndicator.kt (1)
ReedLoadingIndicator(16-36)
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/component/LoginTooltipBox.kt (1)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Theme.kt (1)
ReedTheme(14-21)
core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultAuthRepository.kt (3)
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt (1)
clearRecentLoginMethod(25-25)core/datastore/api/src/main/kotlin/com/ninecraft/booket/core/datastore/api/datasource/LoginMethodDataSource.kt (1)
clearRecentLoginMethod(9-9)core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultLoginMethodDataSource.kt (1)
clearRecentLoginMethod(39-43)
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/component/RecordTooltipBox.kt (1)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Theme.kt (1)
ReedTheme(14-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Compose Stability Check
- GitHub Check: ci-build
🔇 Additional comments (16)
feature/login/src/main/res/values/strings.xml (1)
9-9: 문자열 리소스 추가 확인 완료최근 로그인 기능을 위한 문자열 리소스가 적절하게 추가되었습니다.
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/QuoteStep.kt (1)
48-48: 컴포넌트 리네임 확인 완료
CustomTooltipBox에서RecordTooltipBox로의 리네임이 일관되게 적용되었습니다.Also applies to: 148-148
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/ImpressionStep.kt (1)
54-54: 컴포넌트 리네임 확인 완료
CustomTooltipBox에서RecordTooltipBox로의 리네임이 일관되게 적용되었습니다.Also applies to: 159-161
feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/component/RecordTooltipBox.kt (1)
26-26: 컴포넌트 리네임 확인 완료
CustomTooltipBox에서RecordTooltipBox로의 리네임이 선언부, 프리뷰 함수, 사용처 모두에서 일관되게 적용되었습니다. 더 명확한 네이밍으로 개선되었습니다.Also applies to: 68-70
core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/di/DataStoreQualifier.kt (1)
25-27: DI Qualifier 추가 확인 완료기존 패턴을 따라
LoginMethodDataStorequalifier가 적절하게 추가되었습니다.feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUiState.kt (2)
14-15: LGTM! 상태 속성 추가가 적절합니다.
showLoginTooltip과recentLoginMethod의 기본값이 적절하며, 기존LoginUiState패턴을 잘 따르고 있습니다.
34-34: 이벤트 추가가 적절합니다.
OnDismissLoginTooltip이벤트가 기존 이벤트 네이밍 컨벤션과 일관성 있게 추가되었습니다.feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginPresenter.kt (1)
105-126: 로그인 성공 시 최근 로그인 방식 저장 로직이 적절합니다.Kakao 로그인 성공 후
setRecentLoginMethod(LoginMethod.KAKAO)를 호출하여 다음 로그인 시 툴팁에 표시될 수 있도록 저장하는 로직이 올바르게 구현되었습니다.core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/di/DataStoreGraph.kt (2)
30-37: DataStore 설정이 기존 패턴과 일관성 있게 추가되었습니다.
LOGIN_METHOD_DATASTORE_NAME상수와Context.loginMethodDataStore확장 속성이 기존의 다른 DataStore 설정과 동일한 패턴으로 구현되었습니다.
72-76: DI 바인딩이 올바르게 구성되었습니다.Provider와 Binds 설정이 기존 DataSource들과 동일한 패턴을 따르고 있어 일관성이 유지됩니다.
Also applies to: 92-94
core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultLoginMethodDataSource.kt (1)
17-21: SingleIn 스코프와 의존성 주입이 올바르게 설정되었습니다.
@SingleIn(DataScope::class)와@LoginMethodDataStore한정자를 사용한 DI 설정이 프로젝트의 다른 DataSource 구현체들과 일관성 있게 구성되었습니다.feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/component/LoginTooltipBox.kt (1)
31-49: TriangleShape 구현이 깔끔합니다.커스텀
Shape구현이 명확하고 주석도 잘 되어 있어 코드 이해가 쉽습니다.feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginUi.kt (2)
124-136:recentLoginMethod상태가 UI에서 사용되지 않고 있습니다.현재
state.recentLoginMethod가LoginUiState에 포함되어 있지만, 툴팁 메시지에서 사용되지 않고 있습니다. 항상R.string.recent_login만 표시되는데, 이것이 의도된 동작인지 확인해 주세요.만약 "카카오로 최근 로그인" 또는 "구글로 최근 로그인"처럼 로그인 방식에 따라 다른 메시지를 표시해야 한다면,
recentLoginMethod를 활용하여 동적으로 메시지를 선택해야 합니다.
59-72: 툴팁 해제를 위한 클릭 핸들러 구현이 적절합니다.
showLoginTooltip상태에 따라 조건부로noRippleClickable을 적용하여 툴팁 외부 클릭 시 해제되도록 구현한 부분이 좋습니다.core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultAuthRepository.kt (2)
41-45: 회원 탈퇴 시 최근 로그인 방식 초기화가 적절하게 구현되었습니다.
withdraw()호출 시clearRecentLoginMethod()를 호출하여 계정 삭제 후 로그인 방식 정보가 남지 않도록 처리한 부분이 올바릅니다.
76-81:recentLoginMethod속성과 setter 메서드가 올바르게 구현되었습니다.
loginMethodDataSource에 위임하는 방식으로 깔끔하게 구현되었으며, 기존 repository 패턴과 일관성을 유지하고 있습니다.
| val recentLoginMethod: Flow<LoginMethod> | ||
|
|
||
| suspend fun setRecentLoginMethod(loginMethod: LoginMethod) | ||
|
|
||
| suspend fun clearRecentLoginMethod() |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find and examine the logout implementation in DefaultAuthRepository
rg -A 10 "override suspend fun logout" --type kotlinRepository: YAPP-Github/Reed-Android
Length of output: 1459
logout() 메서드에서 clearRecentLoginMethod() 호출 누락
logout() 메서드에서 clearRecentLoginMethod()를 호출하지 않고 있습니다. withdraw() 메서드에서는 호출되고 있으나, logout()에서는 누락되어 있습니다. 사용자가 로그아웃 후 다시 로그인 화면에 접근할 때 이전 로그인 방식이 표시되는 불일치한 동작이 발생합니다. logout() 메서드에도 clearRecentLoginMethod()를 추가하여 withdraw()와 일관성 있게 수정해주세요.
🤖 Prompt for AI Agents
In
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/AuthRepository.kt
around lines 21 to 25, the recentLoginMethod flow and clearRecentLoginMethod()
are defined but the logout() implementation does not call
clearRecentLoginMethod(), causing the previous login method to remain visible
after logout; update the logout() method to invoke suspend fun
clearRecentLoginMethod() (same as withdraw()) so the stored recent login method
is cleared on logout, and ensure any call is awaited and errors are handled
consistently with withdraw().
| @ComponentPreview | ||
| @Composable | ||
| private fun RecordTooltipBoxPreview() { | ||
| ReedTheme { | ||
| LoginTooltipBox(messageResId = R.string.recent_login) | ||
| } | ||
| } |
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.
Preview 함수명이 컴포넌트명과 일치하지 않습니다.
RecordTooltipBoxPreview가 아닌 LoginTooltipBoxPreview가 되어야 컴포넌트명과 일관성이 유지됩니다. (아마도 이전 네이밍에서 변경 시 누락된 것으로 보입니다)
🔎 제안하는 수정
@ComponentPreview
@Composable
-private fun RecordTooltipBoxPreview() {
+private fun LoginTooltipBoxPreview() {
ReedTheme {
LoginTooltipBox(messageResId = R.string.recent_login)
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @ComponentPreview | |
| @Composable | |
| private fun RecordTooltipBoxPreview() { | |
| ReedTheme { | |
| LoginTooltipBox(messageResId = R.string.recent_login) | |
| } | |
| } | |
| @ComponentPreview | |
| @Composable | |
| private fun LoginTooltipBoxPreview() { | |
| ReedTheme { | |
| LoginTooltipBox(messageResId = R.string.recent_login) | |
| } | |
| } |
🤖 Prompt for AI Agents
In
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/component/LoginTooltipBox.kt
around lines 93 to 99, the Preview function is misnamed RecordTooltipBoxPreview;
rename it to LoginTooltipBoxPreview so the preview function matches the
component name, update any usages or references accordingly, and keep the
annotations (@ComponentPreview, @Composable) and body unchanged.
| LaunchedEffect(Unit) { | ||
| authRepository.recentLoginMethod.collect { method -> | ||
| recentLoginMethod = method | ||
| showLoginTooltip = method != LoginMethod.NONE | ||
| } | ||
| } |
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.
툴팁 해제 후 다시 표시되는 잠재적 문제가 있습니다.
LaunchedEffect에서 collect를 사용하여 recentLoginMethod를 수신하고 있는데, 사용자가 툴팁을 해제(showLoginTooltip = false)한 후에도 Flow에서 동일한 값이 다시 emit되면 툴팁이 다시 표시될 수 있습니다.
해제 상태를 별도로 추적하거나, collectLatest와 함께 해제 플래그를 관리하는 방식을 고려해 주세요.
🔎 제안하는 수정 방안
+ var hasUserDismissedTooltip by rememberRetained { mutableStateOf(false) }
+
LaunchedEffect(Unit) {
authRepository.recentLoginMethod.collect { method ->
recentLoginMethod = method
- showLoginTooltip = method != LoginMethod.NONE
+ showLoginTooltip = method != LoginMethod.NONE && !hasUserDismissedTooltip
}
}그리고 OnDismissLoginTooltip 핸들러에서:
is LoginUiEvent.OnDismissLoginTooltip -> {
showLoginTooltip = false
+ hasUserDismissedTooltip = true
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| LaunchedEffect(Unit) { | |
| authRepository.recentLoginMethod.collect { method -> | |
| recentLoginMethod = method | |
| showLoginTooltip = method != LoginMethod.NONE | |
| } | |
| } | |
| var hasUserDismissedTooltip by rememberRetained { mutableStateOf(false) } | |
| LaunchedEffect(Unit) { | |
| authRepository.recentLoginMethod.collect { method -> | |
| recentLoginMethod = method | |
| showLoginTooltip = method != LoginMethod.NONE && !hasUserDismissedTooltip | |
| } | |
| } |
🤖 Prompt for AI Agents
In
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginPresenter.kt
around lines 58 to 63, the LaunchedEffect collects recentLoginMethod and
unconditionally sets showLoginTooltip when a value is emitted, which allows the
tooltip to reappear if the Flow re-emits the same/non-NONE method after the user
dismissed it; fix by adding a dismissed flag (e.g., loginTooltipDismissed) that
the OnDismissLoginTooltip handler sets to true, and in the collector only set
showLoginTooltip = true when method != LoginMethod.NONE AND
loginTooltipDismissed is false (or use collectLatest and check the dismissed
flag before showing), ensuring the dismiss action prevents future emissions from
re-showing the tooltip.
🔗 관련 이슈
📙 작업 설명
🧪 테스트 내역 (선택)
📸 스크린샷 또는 시연 영상 (선택)
default.mp4
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
릴리스 노트
새 기능
리팩토링
✏️ Tip: You can customize this high-level summary in your review settings.