-
Notifications
You must be signed in to change notification settings - Fork 1
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
[feat/challenge_ui]: 챌린지 현황 뷰 ui 수정 #167
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.
음.... 근데 파일체인지가 98개 있는게 단순히 건드린게 많아서 같지가 않아요...
이전 pr들도 그렇고 제일 처음에 있던 수정사항이 다른 pr에도 반영이 되고 있어서 제일 마지막 pr인 여기서가 가장 파일체인지가 많은 거 같은데.....
깃허브 브랜치 관련해서 뭔가 잘못되고 있는 것 같은데...... 무슨 문제인지 아실까욤..?
collectChallengeState() | ||
collectMainStateAndBindViews() | ||
collectChallengeStateAndBindModifierButton() | ||
// collectUsageGoalsAndModifierStateAndBindView() |
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.
오모나 주석처리 제거 안된 부분이 상당하네요... 웁스 지우겠습니다~
private fun initChallengeCreateButton() { | ||
binding.btnChallengeCreate.setOnClickListener { } | ||
} |
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.
아직 챌린지 생성하기 기능이 없어서 빈 것이라면 간단한 로그나 TODO 넣어놓아도 좋을 것 같습니당
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.
네엡~
// private val _usageGoalsState = MutableStateFlow(UsageGoalsState()) | ||
// val usageGoalsState = _usageGoalsState.asStateFlow() |
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.
usageGoal 관련 로직이 다 주석처리 되어있네용
지금 로그인 안되어서 오류나서 그러는건가요??
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.
지웠습니다~
@@ -28,6 +29,15 @@ data class AppAddState( | |||
class AppAddViewModel @Inject constructor( | |||
private val getInstalledAppUseCase: GetInstalledAppUseCase | |||
) : ViewModel() { | |||
private fun getInstalledApps() { | |||
viewModelScope.launch { | |||
delay(50) |
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.
delay는 왜 추가 되었나요??
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.
Slack에 간단히 언급했던 문제입니당! (https://hmhteamhq.slack.com/archives/C06AHJP0R9R/p1710509172258019)
자세한 설명은 notion에 기록해두면서 해결해 나가려고 하는데(https://www.notion.so/msmmx/NullPointerException-6de7f2846c774cca9c02410a7dd5c2b1) 여기서 조금 설명을 드려보자면,
앱 진입하자마자 달성현황뷰에서 앱추가 선택 시 NullPointerException 발생하는 문제가 있었습니다.
앱을 추가하려면 앱 리스트를 시스템으로 부터 받아와야 합니다. 하지만, 이때 앱 리스트를 받아오는데 이 과정에서 리스트가 다 전달되지 않았는데 이를 사용하려 하는 경우 즉, Empty List를 참조하는 경우가 발생한다고 생각했습니다.
이를 delay를 통해 해당 Exception을 예방하고자 했습니다. (이렇게 하니 문제는 해결되었는데 궁국적인 해결책은 아닌 것 같다는 생각이 듭니다. 일단 'NullPointerException을 예방하기 위한 임시 해결책'이라고 생각해주시면 될 것 같아요!)
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.
오 그렇군용 ! delay방법과 비슷하게 LodingView를 넣는 것도 또 다른 방법이 될 것 같아용!
import com.hmh.hamyeonham.feature.challenge.R | ||
import com.hmh.hamyeonham.feature.challenge.databinding.ItemChallengeStatusBinding | ||
|
||
class ChallengeCalendarAdapter : | ||
class ChallengeCalendarAdapter(private val context: Context) : |
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.
이 context는 언제 사용되는걸까요??
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.
해당 부분은 viewHolder에 다시 전달되어 getColor함수에서 (아이디에 따른 색상 값을 가져올 때) 사용됩니다.
fun setVisibility(modifierState: ModifierState) { | ||
val editMode = if (modifierState == ModifierState.EDIT) View.INVISIBLE else View.VISIBLE | ||
val doneMode = if (modifierState != ModifierState.EDIT) View.INVISIBLE else View.VISIBLE | ||
binding.tvAppName.visibility = doneMode | ||
binding.tvAppUsageGoal.visibility = doneMode | ||
|
||
binding.tvAppNameDelete.visibility = editMode | ||
binding.tvAppUsageGoalDelete.visibility = editMode | ||
binding.ivTrash.visibility = editMode | ||
} |
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.
앱 편집 상태에 따른 UI 변경 맞죠?? 확인했습니당
첫 pr 이후 브랜치들 첫pr의 브랜치 기준으로 소브랜치 파서 작업한건가요?? |
…init~~ 으로 함수 명 변경
enum class ModifierState { | ||
DELETE, | ||
CANCEL, | ||
EDIT, DONE, |
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.
네이밍 변경된거 너무 좋은 것 같아용
binding.tvAppName.visibility = doneMode | ||
binding.tvAppUsageGoal.visibility = doneMode | ||
|
||
binding.tvAppNameDelete.visibility = editMode | ||
binding.tvAppUsageGoalDelete.visibility = editMode | ||
binding.ivTrash.visibility = editMode |
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.
각 텍스트들을 state에 따라 보이게, 안보이게 하는 코드 같은데
visible 보다는 텍스트뷰는 하나로 두고 각 state에 따라 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.
이전 코드 보다 훨씬 깔끔해진 것 같아용~!
@@ -0,0 +1,94 @@ | |||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
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.
이거 포인트 뱃지 아이콘 맞을까요????
이 아이콘 파일이 포인트 받기 뷰에서도 쓰이는데 core로 빼는 거 어떨까요??
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.
넵 수정하겠습니당
[�feat/challenge_ui]: 챌린지 현황 뷰 ui 수정
개요
작업 사항
스크린샷(optional)
Screen_recording_20240315_221331.webm
허거덩,,, 하다보니 파일 98개나 건들였네요,,,, 매우 송구스럽습니다만 아이콘 추가가 많아서 그런 파일도 많을거에요,,,, 쓰흡,,,,