-
Notifications
You must be signed in to change notification settings - Fork 2
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
[fix] 1차 QA 수정사항 반영 - 지은 #135
Conversation
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.
수고하셨습니둥
@@ -50,8 +50,7 @@ class PlanViewModel @Inject constructor( | |||
private val _selectedCategory = MutableStateFlow<CategoryType?>(null) | |||
val selectedCategory get() = _selectedCategory.asStateFlow() | |||
|
|||
private val _selectedRecruitment = MutableStateFlow<String?>("1") | |||
val selectedRecruitment get() = _selectedRecruitment.asStateFlow() | |||
val selectedRecruitment = MutableStateFlow("1") |
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.
상수화 진행 부탁요
(currentPage == PlanType.OPENCHATTING.position && planOpenChattingLink.isNotBlank()) || | ||
(currentPage == PlanType.SUMMARY.position) | ||
}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), false) | ||
|
||
private fun checkRecruitment(selectedRecruitment: String): Boolean { | ||
val recruitment = selectedRecruitment.toInt() | ||
if (recruitment in 2..99) return true |
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.
얘도 상수화 해주세요
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.
머지하세요
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.
양방향 데이터 바인딩 처음이라고 했는데 너무 고생하셨습니다~
fun incRecruitmentNum() { | ||
selectedRecruitment.value?.toInt()?.let { setSelectedRecruitment(it.plus(1).toString()) } | ||
selectedRecruitment.value.toInt().let { setSelectedRecruitment(it.plus(1).toString()) } |
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.
상수화 해주세요!
@@ -195,7 +204,7 @@ class PlanViewModel @Inject constructor( | |||
runCatching { | |||
_selectedCategory.value?.let { selectedCategory -> | |||
_selectedLocation.value?.let { selectedLocation -> | |||
_selectedRecruitment.value?.let { selectedRecruitment -> | |||
selectedRecruitment.value?.let { selectedRecruitment -> |
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.
let 잘 쓰시네요
@@ -58,7 +59,8 @@ class PlanRecruitmentFragment : | |||
|
|||
private fun collectData() { | |||
viewModel.selectedRecruitment.flowWithLifecycle(lifecycle).onEach { selectedRecruitment -> | |||
when (selectedRecruitment.toString()) { | |||
when (selectedRecruitment) { | |||
INVALID_RECRUITMENT -> viewModel.setSelectedRecruitment("1") |
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.
상수화 해주세요
@@ -64,7 +64,7 @@ | |||
android:inputType="number" | |||
android:maxLength="2" | |||
android:paddingVertical="@dimen/spacing28" | |||
android:text="@{planViewModel.selectedRecruitment}" | |||
android:text="@={planViewModel.selectedRecruitment}" |
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.
양방향 데이터 굳굳굳!~
Related issue 🛠
Work Description ✏️
Screenshot 📸
XRecorder_15012024_022344.mp4
Uncompleted Tasks 😅
N/A
To Reviewers 📢
흠냥 바인딩어댑터 @JvmStatic @InverseMethod 이런 거 쓰면서 삽질하고 있었는데
그냥 val로 선언하면 해결되는 문제였슴ㅋㅅㅋㅜ..
Thanks to 건빵레포